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

Patrick R. Michaud pmichaud at pobox.com
Sun Dec 11 20:06:22 CST 2005


On Sun, Dec 11, 2005 at 03:17:32PM -0500, DaveG wrote:
> 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']-->

Short answer:

<!--markup:<<|$TrailSource|>>-->

Longer answer -- global variables in a template file are
automatically replaced by their value(s).

Pm





More information about the pmwiki-users mailing list