> I have recently started to use Draft pages. On thing I would like to be 
> able to do is to make it obvious that the page I am working on is a 
> draft. I don't think that SwitchToAndFromDraft quite does what I want.
> 
> I would like something like a background water mark on the page, or a 
> big red "Draft" in the title. So really my question is "How can I 
> customize a set of pages with names like *-Draft?".
> 
> I can see how I can customize whole groups using config.php, but not 
> subsets of pages within a group.
> 
Of course ten minutes after posting this I found out how to do it! The 
following example changes the page logo for all pages ending in -Draft.

$pagename = ResolvePageName($pagename);

$name = PageVar($pagename, '$Name');

if (preg_match('/-Draft$/', $name)) {
   $PageLogoUrl = "$PubDirUrl/skins/pmwiki/pmwiki-32.gif";
}

Ian.

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to