[pmwiki-users] markup parse issue
DaveG
pmwiki at solidgone.com
Tue Feb 10 07:28:35 CST 2009
Henrik Bechmann wrote:
> All,
>
> I have the following markup:
>
> (:div2 class="header-content"
> style="height:84px;background-image:url({$SkinDirUrl}/garden_bg.jpg);":)
<snip>
>
> ...which of course is a css error.
> Is there anything I can do to just get
> background-image:url(http://parkcommons.ca/shared/wiki/app/pub/skins/FoldersCMSBase/garden_bg.jpg)
Actually, it's preferable (from a philisophical point-of-view) to not
use in-line styles. That way you avoid this problem altogether. Use
mutiple classes in the markup. Then you can either define the class in
the css, or dynamically assign the class in the pmwiki header.
(:div2 class="header-content garden-bg" :)
and then the css:
.header-content
{some css};
.header-content .garden-bg
{height:84px;background-image:url(hard-coded-path/garden_bg.jpg);}
Or if the path is not constant, or you don't want to hard-code it use:
$HTMLStylesFmt['myskin'] =
".header-content .garden-bg
{height:84px;background-image:url({$SkinUrl}/garden_bg.jpg);}";
~ ~ Dave
More information about the pmwiki-users
mailing list