[pmwiki-users] Using an if statement to detect skin .tmpl?

Eric Forgeot eforgeot at gmail.com
Sat Oct 26 03:42:31 CDT 2013

In addition or in replacement to the detectskin cookbook you can also
consider using responsive design in your CSS, which would detect your
screen size.

See http://en.m.wikipedia.org/wiki/Responsive_web_design

You can also have a look at a PmWiki skin I made this way:
Le 26 oct. 2013 09:11, "Ian MacGregor" <ardchoille42 at me.com> a écrit :

> I am designing two different skins for my website; a desktop skin and a
> mobile skin. I tried using the Detect Skin recipe but it won't work because
> it doesn't differentiate between iPads and iPhones - it considers them both
> mobile devices but the screen sizes are very different.
> What I'd like to do is include a conditional statement in my website
> header that allows visitors to toggle between a desktop skin and a mobile
> skin. I have installed the Set Skin recipe that allows users to switch to a
> different skin simply by adding ?setskin=skinname to the end of a page url.
> What I need to be able to do is detect which skin is currently being used.
> How would I do this?
> (:if $Skin desktopskin:)
> [[{*$FullName}?setskin=mobileskin | Mobile View]]
> (:else:)
> [[{*$FullName}?setskin=desktopskin | Desktop View]]
> (:ifend:)
> Which variable is used for the skin and how do I use this variable in a
> conditional statement?
> Regards,
> Rev. Ian MacGregor
> http://www.ianmacgregor.net
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20131026/b86bd1a1/attachment.html>

More information about the pmwiki-users mailing list