[pmwiki-users] Wiki trail in template header and footer

DaveG pmwiki at solidgone.com
Sun Dec 11 14:17:32 CST 2005


I may be using this wrongly. Declaring the markup below will create a 
variable. *How do I reference it in the tmpl?* I tried a few ways, but 
all failed, so I'm not sure if I'm using the markup incorrectly or 
referencing incorrectly.

I'm using this markup:
 >   Markup('^trail:', 'directives',
 >     '/^trail:(.*)/e',
 >     "\$GLOBALS['TrailSource']='$1'");

In a wiki-page I put:
    trail:xyz

The output of the page displays "xyz".

I tried referencing using:
    $GLOBAL['TrailSource']
and
    <!wiki:$GLOBALS['TrailSource']-->
and
    <!markup:$GLOBALS['TrailSource']-->

At this point you can probably tell, I have no clue :)

  ~ ~ Dave

Patrick R. Michaud wrote:
> On Sun, Dec 11, 2005 at 12:37:04PM -0500, DaveG wrote:
> 
>>I know how to create a markup rule. That part I'm not sure about is 
>>creating a variable that can be referenced in the template. I imagine 
>>it's something like:
>>Markup('^trail:', 'directives', '/^trail:(.*?)$/', '$TrailSource="$1";');
>>That would allow someone to enter: "trail: Group/Pagename". And then 
>>simply reference $TrailSource in the tmpl file. Close?
> 
> 
> Close.  It's actually:
> 
>   Markup('^trail:', 'directives',
>     '/^trail:(.*)/e',
>     "\$GLOBALS['TrailSource']='$1'");
> 
> Pm
> 




More information about the pmwiki-users mailing list