[Pmwiki-users] Re: Skins

Steven Leite steven_leite
Tue Feb 24 21:55:26 CST 2004


>It seems that it may be desirable to have different templates for different
actions.

First, the bad new:  This works for small systems (only a few templates to
modify), but if PmWiki expands further, and several CookBook add-ons are
incorporated (like image gallery, or calendar or something), then should we
have yet more templates?  I don't like so many templates, it becomes a pain
in the butt to edit.  What if you change skins, then you have another bunch
of templates to edit!

Now the good news:  You can already achieve everything you want in a single
template.  Just make sure you properly comment the various sections.
Patrick already outlined this in a previous post, unfortunately, I can't
find his post to reference it, but it goes something like this:

If you insert:

<!--FmtEditPage-->
put html here that you want in your edit page, but not in your other pages

<!--FmtPageFooter-->
puth html here that you want to be considered as a footer, that way if the
[[nofooter]] directive is called in any page, any html in this block will be
effectively turned off

<!--FmtSearchResults-->
html in this block only appears in the search results page

NOTE:  The syntax above is probably not quite right.  But it's enough to get
the point accross.  What we need now is a page in the Instruction that
guides users to all of the possible (valid) <!--CommentsThatDoSomething-->
that can be inserted in to a template.  But for now, just look at the
template that is included with 6.1 and later release, that will be enough to
get you started.

I really like this approach, because all the modifications to all the
different templates are contained in a single template file.  The pieces or
parts (that are correctly labelled with comment blocks) will be utilized by
PmWiki only when they are required.

--S




More information about the pmwiki-users mailing list