[pmwiki-users] pmwiki-2.2.0-beta3 released (new pagelist code)

Martin Fick mogulguy at yahoo.com
Wed Sep 27 19:02:09 CDT 2006

--- "Patrick R. Michaud" <pmichaud at pobox.com> wrote:
> But it's likely that the trails code will get a 
> substantial update, and that one will be able to do 
> things like
>     <<|[[!Category]]|>>         
>     <<|(:pagelist group=Main:)|>>

Cool, but honestly less pressing to me since I do both
of those using other methods which you plan on adding
to the core soon:

1)  <<|[[!Category]]|>>         

  Is doable with the $$<option> from the
pagelistextensions recipe and $?<var> from the
HttpVariables recipe which you plan on both offering
versions of soon anyway! :)

  I create the trail markup dynamically so that it is
URL dependent (allowing multi categories and
obfuscating the non "lit" categories):

(:if expr ! equal {$!TrailLink} :)
(:pagelist fmt=TrailLink link={$!TrailLink}:)

The pagelist template:

(:if equal {$FullName}
| [[{$!TrailLink}|+]] |

Hmm, I guess that with the linksfrom= option we will
be able to make this even list a trail at the top of
each page for every category that the page is in
automatically and highlight the "lit" trail!  

This probably sounds crazy, but I have just
implemented something like this here (using the
current targets= from pagelistextensions):


Notice the blue 'lit' category trail!  You can advance
forward and backward on the non lit trails too by
clicking on the < or >.

Here is the pagelist to put in your

(:pagelist fmt=PageList/Trail targets={$Trail}:)

The pagelist templates:


(:if expr ! equal {<$Group} {=$Group} AND equal
{=$Group} Category :)
(:table class=pagelist bgcolor=beige:)
[-[['''Categories'''->{=$Group}.HomePage]]: -]
(:if equal {=$Group} Category :)
[-(:pagelist link={=$FullName}
(:if expr ! equal {>$Group} {=$Group} AND equal
{=$Group} Category :)


(:if expr equal {$!TrailLink} {$$link} && equal
{$FullName} {=$FullName} :)%blue%
expr ! equal {$!TrailLink} {$$link} && equal
{$FullName} {=$FullName}

Nifty eh? :)  (Sorry I had to show this one off, it's
so cool!)

2)  <<|(:pagelist group=Main:)|>>

  Is doable with a pagelist template following the
DynamicTrails recipe which does not require any
scripts or mods.

  Just thought I would share some alternative methods
in case they inspire anything new...


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the pmwiki-users mailing list