Code: Select all
{content assign='freddy'}
{mobile}{capture assign='mobiletemp'}{$mobile_detect}{/capture} {* UDT from Goran Ilic *}
{if $mobiletemp}
{cms_stylesheet name='mobile'}
{$freddy}
{else}
{cms_stylesheet name='full'}
{various menus and columns etc}
{$freddy}
{/if}
What I would like to do is to add a link or button in the content block I have assigned as 'freddy' which would assign a session variable I would call 'forcefullsite'. Then I could use the following logic.
Code: Select all
{content assign='freddy' NOW INCLUDES THE BUTTON}
{[mock code] if session variable equals forcefullsite [/mockcode]}
{cms_stylesheet name='full'}
{various menus and columns etc}
{$freddy}
{else}
{mobile}{capture assign='mobiletemp'}{$mobile_detect} {/capture} {* UDT from Goran Ilic *}
{if $mobiletemp}
{cms_stylesheet name='mobile'}
{$freddy}
{else}
{cms_stylesheet name='full'}
{various menus and columns etc}
{$freddy}
{/if}
Question: Can I set a variable as I propose? Can anyone give me the three or four lines of code I would need? I am already way outside my limited skill level

Many thanks
Andrew Prior