[pmwiki-users] Note to skin designers
Patrick R. Michaud
pmichaud at pobox.com
Sat Feb 19 08:34:01 CST 2005
On Sat, Feb 19, 2005 at 08:50:03AM +0000, Hans wrote:
>
> Will this change have any bearing on defining markups for the
> suppression of template sections, like Markup('noleft',...) ?
The previous definitions will (should) continue to work, although
they can now be rewritten as:
Markup('noheader', 'directives',
'/\\(:noheader:\\)/e', "SetTmplDisplay('PageHeaderFmt', 0)");
Markup('noleft', 'directives',
'/\\(:noleft:\\)/e', "SetTmplDisplay('PageLeftFmt', 0)");
# etc.
> Is there a good way to define actions for the suppression of template
> sections, for instance action=noleft ?
Well, I wouldn't use ?action, since it really means something else.
You could define a ?noleft parameter:
if ($_REQUEST['noleft']) SetTmplDisplay('PageLeftFmt', 0);
and then use URLs like
http://www.pmwiki.org/wiki/Test/TmplDisplay?noleft=1
http://www.pmwiki.org/wiki/Test/TmplDisplay?notitle=1
http://www.pmwiki.org/wiki/test/TmplDisplay?noheader=1
http://www.pmwiki.org/wiki/test/TmplDisplay?noheader=1&noleft=1
> And lastly a question to all skin designers:
> Would a recommended name for a template section containing the top
> action links ('wikicmds' in pmwiki.tmpl) be <!--PageCommandsFmt-->?
> I have used <!--PageActionFmt--> for this so far, but I would be happy
> to follow a convention, so any custom markup using this can be more
> generally employed by other skins as well.
I like <!--PageCommandsFmt--> (or <!--PageCmdsFmt-->, analogous to
'wikicmds') because someone might think that PageActionFmt is
programmatically related to ?action in the code somewhere. But I
don't have a strong feeling about this, and will use whatever
convention we come up with.
Pm
More information about the pmwiki-users
mailing list