Thanks Susan,
So what is that section of code actually doing? I dont know any PHP so cant really tell....
I am using the mobile detect script to check whether the user is viewing on a mobile initially and automatically switching the template that clads the page on load, then I have an optout button for users that want to view the full version of the site even if they are deemed to be on a mobile device.
I have some pages in the site which use templates which are not the same name as their alias so i cant use this line of code on all pages:
<a href="[~[*id*]~]&template=[*alias*]">link</a>
I need some way of saying on the a href if you are viewing page A then load template Template A etx, if you are viewing page B then load Template A etx...
Is that possible?