[Pmwiki-users] Skins

Patrick R. Michaud pmichaud
Sat Feb 21 18:04:57 CST 2004


On Sun, Feb 22, 2004 at 05:42:29AM -0800, Steven Leite wrote:
> 
> > I haven't figured out a good way in a template file to
> > indicate headers, footers, titles, etc. in order to be able to honor
> > the [[noheader]], [[nofooter]], [[notitle]], etc. directives and to be
> > able to properly embed variables such as $Title, $Group, $PageUrl, etc.
> > please).  Also be sure to include some way of being able to distinguish
> > the header, title, sidebars, and footer in the template, so that they
> > can be disabled on output.
> 
> Restrictions like this should be the programmer's responsibility, not the
> user's :-)  Bearing all that in mind, here's what I (an in-experienced
> programmer) might expect:

Okay, bear in mind that if we don't consider those restrictions then
we may not be able to support those directives.  But ignoring that for
the moment...

> I might expect to write my template in [[insert favorite wysiwyg html editor
> here]].

Agreed.

> I might expect that I should be able to add special output components
> such as {{$Title}} or {{$LastModified}} in my template and have them parsed
> by PmWiki and replaced with appropriate plain text content.

Okay, I can probably do this.  Would a new admin get confused between 
wiki markup and this syntax, where {{free link}} means something different
in a wiki edit form than it does in a template file?

Do we need the {{...}} around the substitutions, or would just $Title and
$LastModified be sufficient?

> At a rudimentary level, I might expect to insert {{$WikiContent}} and have
> it replaced by the wiki page (plain vanilla version).  I might also expect
> to use existing layout scheme.  Perhaps both can co-exist.

PmWiki has no problem with multiple layout schemes, so yes they can
co-exist.

> I might expect that, in order to identify different parts of the template
> (eg.  sidebars, headers, footers, etc), so the [[noheader]], [[nofooter]]
> and [[notitle]] directives are honoured,  I might use some form of existing
> html comments, for example:
> 
> <!--PmWikiFooterStart-->
>  ... some html ...
> <!--PmWikiFooterEnd-->

Reasonable.  Would it be okay to also allow comments such as

<!--wiki:$Group.SideBar Main.SideBar-->
<!--function:MyPhpFunction-->

to allow other wiki pages or specialized PHP functions to be called?

One last comment...

> Nah, not really a problem.  Anybody that uses css files understands the
> difference between inline css and external css.  Location is just a minor
> detail.

This is not completely a minor detail--inline css and external css are
interpreted differently, in terms of priority, and if we didn't allow
external css files then there wouldn't be any confusion about "where do
my template files go", as they'd all be in local/. 

Pm



More information about the pmwiki-users mailing list