[pmwiki-users] wikitrail from a pagelist (for a blog)

Tegan Dowling tmdowling at gmail.com
Wed Jan 2 14:28:01 CST 2008


On Jan 2, 2008 1:25 PM, noskule <noskule at gmx.net> wrote:

> hi list
> Is it somehow possible to build a wikitrail where the trail index page
> is generated with a pagelist.
>
> I would like a trail naviagation in the groupheader of every blogpost
> that allows to navigate to the previous/next blog post.
>
> I tried with:
>
> Blog GroupHeader:
> <<|[[Site.BlogTrail]]|>>
>
>
> Site.BlogTrail:
> (:pagelist group={*$Group} order=ctime:)
>
>
> This don't work. Is there a way to do this?
> thank's for any hints
> nos


To get a dynamic trail, you just use the pagelist markup itself in your
GroupHeader, instead of the trail markup.  Your pagelist uses a custom fmt
parameter, say, fmt=#trailindex, which you define on your page
Site/LocalTemplates.

So in your header, put something like

----
->'''''<< Read other entries... >>'''''
(:pagelist group ={*$Group} order=ctime fmt=#trailindex:)
----


On my page http://www.nonviolentworm.org/Site/LocalTemplates (NOTE this site
is v2.1.26, and uses the older relative page-name scheme), I have

[[#trailindex]]
(:if equal {$FullName} {=$FullName}:)
(:table cellpadding=0 cellspacing=0 border=0:)
(:cell valign=middle:)
->[-previous-]
<<&nbsp;[[{<$FullName}|{<$Title}]]
(:cell valign=middle:)
|&nbsp;[[{=$FullName}|{=$Title}]]&nbsp;|
(:cell valign=middle:)
[-next-]
[[{>$FullName}|{>$Title}]]&nbsp;>>
(:tableend:)
(:if:)
[[#trailindexend]]

You can see it in use on any blog entry in the group
http://www.nonviolentworm.org/DiaryOfAWorm.  For example, above the content
of http://www.nonviolentworm.org/DiaryOfAWorm/20071230-BarrenBeauty, the
GroupHeader displays:

« Read other entries… »
        previous                                   next
<< Less We Forget | Barren Beauty | The Last Shall Be First >>


I hope that helps,

Tegan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-users/attachments/20080102/f219cb90/attachment.html 


More information about the pmwiki-users mailing list