[pmwiki-users] Automated WikiTrails.

Stirling Westrup sti at pooq.com
Tue Aug 29 03:53:25 CDT 2006

Roman wrote:
>> The intent is that all I need to do to add a new chapter to StoryTitle
>> is to simply save it in the Stories group with its chapter number and it
>> will gain an appropriate wikitrail while the StoryTitle page will be
>> automatically updated.
> If you put this to Site/LocalTemplates:
> [[#trailstory]]
> (:if equal {$FullName} {=$FullName}:)%wikitrail%[[{<$FullName}|<<
> Previous Story - {{<$FullName}$Title}]] | [[StoryTitle/]] |
> [[{>$FullName}|Next Story - {{>$FullName}$Title} >>]](:if:)
> [[#trailstoryend]]
> then this to Story GroupHeader
> (:pagelist name=StoryTitle.StoryTitle-* fmt=#trailstory:)
> and this to StoryTitle/
> (:pagelist name=StoryTitle.StoryTitle-*:)
> will it do what you want?

Almost. The problem is that there are multiple stories in the Stories
group. So I have pages for FirstStoryTitle SecondStoryTitle,
ThirdStoryTitle, etc., each of which needs its own separate wikitrail.
The Story GroupHeader you propose needs to know the name of the story to
match on. If I could use something like this, it would work:

(:pagelist name=/Stories.*-[0-9]+/ fmt=#trailstory:)

But I can't put regexes into a pagelist. What's worse, I have
Story-related pages like FirstStoryTitle-Notes and
FirstStoryTitle-Description that are special cases and shouldn't be
included in the wikitrail.

Still, this is so close that it seems likely that there is some sort of
new page variable or markup that I could define to do the job. Maybe
something along the lines of {$StoryName} that resolves to the base
story name on chapter pages, but it blank otherwise.

I'll look into it, thanks!

More information about the pmwiki-users mailing list