[pmwiki-users] Can I access $Skin for testing in a page?

Hans design5 at softflow.co.uk
Mon May 19 11:11:47 CDT 2008

Monday, May 19, 2008, 2:37:59 PM, Harry Forsdick wrote:

> I would like to access the $Skin variable to conditionally include an image
> based on the particular skin in place.  Can I do this? and if so, how?

First add to config.php:

# add {$Skin} page variable
$FmtPV['$Skin'] = '$GLOBALS["Skin"]';

then use in a page for instance like this:

(:if equal {$Skin} 'SkinName':)Attach:SkinNameImage.jpg
(:if equal {$Skin} 'Skin2':)Attach:Skin2Image.jpg

If you mean to use background images then please look at
and combine that with the above conditional.


More information about the pmwiki-users mailing list