[pmwiki-users] Quick, curious question...

Patrick R. Michaud pmichaud at pobox.com
Thu Apr 6 08:20:10 CDT 2006


On Thu, Apr 06, 2006 at 01:38:05PM +0100, Octocias wrote:
>    In  http://pmwiki.org/wiki/Cookbook/PagelistTemplateSamples,
> 
>    What I would like to know is, what do the "=" and "<" signs mean, and why
>    are they INSIDE the curly braces?

Short answer:  The '=' and '<' represent the "current" and "previous"
page in the page list.

Long answer:  The curly braces are often used to represent
"page variables", such as {$Title}, {$Group}, {$LastModifiedBy}, etc.

We can also put a pagename in front of the '$', to get the
page variable value corresponding to another page -- thus:

    {HomePage$Title}
    {AGroup.AnotherPage$LastModifiedBy}

While formatting items in a pagelist, however, it's useful to be
able to refer to the current, previous, and next pages in the 
pagelist as we're formatting each item.  So, the "=", "<", and ">"
markers are used as markers for the current, previous, and next
pagenames in the pagelist.

Thus, in the example you cite:

>    >>fplsidebar<<
>    (:if ! equal {<$Group} {=$Group}:)
>    %sidehead%[[{=$Group}]](:if:)
>    * [[{=$FullName}|+]]
>    (:if equal {>$Group}:)
>    >><<(:if:)

    {<$Group} - group of previous page in the list
    {=$Group} - group of current page in the list
    {=$FullName} -- full pagename of current page in list
    {>$Group} - group of next page of list

The (:if:) conditions end up being:

    (:if ! equal {<$Group} {=$Group}:)  -- first page in a new group

    (:if equal {>$Group} :)   -- last page in list

Hope this helps.

Pm





More information about the pmwiki-users mailing list