[Pmwiki-users] Re: Skins, revisited

Steven Leite steven_leite
Sat Oct 30 13:16:05 CDT 2004


> I was looking forward to use  "easy-templates"  like feature in v2.0
> for use of data-entry wiki-form page. Where the use of full page
> without sidebar would feel more comfortable.
>
> Krishn

Pm just posted a four-liner code snippet a day or two ago, that
effectively does exactly what easy-templates.php did in PmWiki 1.x.  I
haven't tried it yet, but it looks good.

Here's the snippet.  You can always save it as easy-templates.php, then
include it in your config.php, but it's so short, it's hardly worth it.
Just cut-and-paste to your config.php.

Code snippet from Pm:

if
(file_exists(FmtPageName('pub/skins/$Group/$Name/$Name.tmpl',$pagename))
)
   $PageSkinFmt = '$Group/$Name/$Name.tmpl';
else if
(file_exists(FmtPageName('pub/skins/$Group/$Group.tmpl',$pagename)))
   $PageSkinFmt = '$Group/$Group.tmpl';

You might want to change any mention of $Name.tmpl or $Group.tmpl to
$Name.htm and $Group.htm if you want to follow the same naming
convention that was used in easy-templates.

-Steven Leite





More information about the pmwiki-users mailing list