[Pmwiki-users] Templates and variables: a thought

Patrick R. Michaud pmichaud
Thu Feb 26 17:36:26 CST 2004


On Fri, Feb 27, 2004 at 10:52:46AM +1100, Nathan Jones wrote:
> Last I heard, a variable starts at <!--Page...Fmt--> and includes
> everything up to the next variable or the end of file.
> 
> I'm not sure if this has already come up, but... is there a way to
> indicate the end of a <!--Page...Fmt--> variable in a template? (And if
> not, can one be created?)

At present, no, there isn't one, and yes, there needs to be one for 
the reasons you present (as well as potentially some others).  What 
should we use as an ending markup?  Or, another way to think of the
"ending" markup is that it is something that marks the beginning of
an "anonymous" section--a section not associated with a particular
variable, name, or feature.

> 1. Output HTML may not be complete. Example:
> 
> If I turn off the footer with [[nofooter]], then the </body> and </html>
> end tags won't get sent to the browser. Not a major problem, but some
> people may want to have valid HTML generated.

Including me--and I had forgotten about this case.  Thanks for the
reminder and when we come up with an appropriate ender I'll fix it in 
the pmwiki templates.

> I want a message displayed after the <!--PageText-->, regardless of
> wheter the footer is displayed, so I put it before <!--PageFooterFmt-->.
> I also want to define <!--PageEditFmt-->, so I put that between
> <!--PageText--> and my message.
> 
> Now my message is not displayed in browse mode, since it is considered to
> be part of <!--PageEditFmt-->.

Two points in this scenario:
1.  The message could go between <!--PageText--> and <!--PageEditFmt-->
    and it would be always displayed
2.  Originally I thought that it would be better to have <!--PageEditFmt-->
    defined after the final </html> tag, in which case the always-printed
    message would go after <!--PageText--> but before <!--PageFooterFmt-->.  
    But now as I think about it more I can see why one would want to put
    <!--PageEditFmt--> in the middle of the document.  In which case
    see #1.  :-)

Pm



More information about the pmwiki-users mailing list