[pmwiki-users] Wiki trail in template header and footer
Patrick R. Michaud
pmichaud at pobox.com
Sun Dec 11 21:44:50 CST 2005
On Sun, Dec 11, 2005 at 10:09:53PM -0500, DaveG wrote:
> > Short answer:
> > <!--markup:<<|$TrailSource|>>-->
> Using this doesn't provide the normal trail links, simply text formatted
> like a trail (ref the first trail under the "Wiki Sandbox" title:
As far as I can tell the markup is working -- the Main.WikiSandbox
page isn't on the DIY trial, so no forward and backward links
are displayed. If you were to put Main.WikiSandbox on the DIY trail,
or use the (:trail:) markup on a page that is on the trail, you'd
see the forward and backward links.
What are you expecting to see there?
(Also, note that others on this list and other recipes have mentioned
using a markup of "(:trail:)"; I don't know if anything came of that.)
> Patrick R. Michaud wrote:
> >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']
> >> <!wiki:$GLOBALS['TrailSource']-->
> >> <!markup:$GLOBALS['TrailSource']-->
> >Short answer:
> >Longer answer -- global variables in a template file are
> >automatically replaced by their value(s).
More information about the pmwiki-users