[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}
{=$FullName}:)[[{<$FullName}?TrailLink={$!TrailLink}|{<$Titlespaced}]]
| [[{$!TrailLink}|+]] |
[[{>$FullName}?TrailLink={$!TrailLink}|{>$Titlespaced}]](:if:)



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):

http://www.theficks.name/Photos/Imgp2813?TrailLink=Category.RockyMountainNationalPark

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
GroupFooter/Header:

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

The pagelist templates:

PageList/CategoryBoxTrails

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


PageList/TrailLinkCategoryBox:

(:if expr equal {$!TrailLink} {$$link} && equal
{$FullName} {=$FullName} :)%blue%
[[{<$FullName}?TrailLink={$$link}|<]]'''='''[[{$$link}|+]]'''='''[[{>$FullName}?TrailLink={$$link}|>]]%%(:if
expr ! equal {$!TrailLink} {$$link} && equal
{$FullName} {=$FullName}
:)[[{<$FullName}?TrailLink={$$link}|<]][[{$$link}|+]][[{>$FullName}?TrailLink={$$link}|>]](:if:)


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...


-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list