[pmwiki-users] Automated WikiTrails.

Martin Fick mogulguy at yahoo.com
Tue Aug 29 17:37:36 CDT 2006

--- Stirling Westrup <sti at pooq.com> wrote:

> > --- Stirling Westrup <sti at pooq.com> wrote:
> > 
> I also didn't like the idea of tacking things onto
> my URLs to carry the
> trailness of the process, as it were.
> In the end I did get it all to work though. I added
> the following lines
> to my local/config.php:
>  global $FmtPV,$pagename,$BaseName;
>  #define a new list=chapters pagelist option.
>  $SearchPatterns['chapters'][] = '/-\\d+$/';
>  #Create a new {$BaseName} Page Variable which is
> the same as {$Name}
>  #but with any trailing '-' part of the name
> removed.
>  $BaseName =
>  $FmtPV['$BaseName'] = '$GLOBALS["BaseName"]';
> Then I created a Stories.GroupHeader containing:
>  (:pagelist name={$BaseName}-* list=chapters
> fmt=#trailstory:)

That was going to be my next suggestion. :) I think
that is a fairly elegant solution for this special
purpose problem.  One way to potentially make it
slightly more generic would be to use the
PageVariablesExtensions recipe with a custom function
which can remove the trailing part of the name.

Glad to hear that you have a nice working solution!


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

More information about the pmwiki-users mailing list