[pmwiki-users] Can't use $SkinDirUrl in $HTMLStylesFmt[] ?

Petko Yotov 5ko at 5ko.fr
Thu Jun 23 16:47:36 CDT 2011


On Thursday 23 June 2011 18:02:57, Oliver Betz wrote :
> is it correct that $SkinDirUrl isn't set early enough to be used in in
> $HTMLStylesFmt[]?

Yes, but you can escape the $ with \$ inside double quotes:

  $HTMLStylesFmt['my-menu'] = "<link rel='stylesheet'
   href='\$SkinDirUrl/menu.css' type='text/css' />";

Inside single quotes, no need to use \$.

  $HTMLStylesFmt['my-menu'] = '<link rel="stylesheet"
   href="$SkinDirUrl/menu.css" type="text/css" />';

> I can use $PubDirUrl and $Skin, so "$PubDirUrl/skins/$Skin" yields the
> correct path.

You shouldn't need to expand $PubDirUrl, $FarmPubDirUrl, or $Skin in 
config.php, either wrap them in single quotes or, if in double quotes, escape 
the $ with \$.

Petko



More information about the pmwiki-users mailing list