[pmwiki-users] jumpbox error

Patrick R. Michaud pmichaud at pobox.com
Thu Dec 14 17:44:57 CST 2006


On Thu, Dec 14, 2006 at 11:27:13PM +0000, Hans wrote:
> Thursday, December 14, 2006, 11:24:15 PM, Patrick wrote:
> 
> > Even better is
> 
> >     (:input jumpbox "{Cookbook.Input$PageUrl}" Input:)
> 
> > because it will then use the correct url for the page 
> > regardless of the ?n=Cookbook.Input or /Cookbook/Input form.
> 
> I thought ?n=Group.Name will always work.

It will always work, but it means that the url in the address
bar might not match the form of other urls (e.g., on pmwiki.org
the urls are /wiki/Group/Name, not /wiki?n=Group.Name).

> {Cookbook.Input$PageUrl} looks spooky to me at first glance, since
> PageUrl is at the end. Could you please explain this construct?

That just means the url of the Cookbook.Input page.  It's the same
as any other page variable:

    {Cookbook.Input$Name}           Input
    {Cookbook.Input$Group}          Cookbook
    {Cookbook.Input$FullName}       Cookbook.Input
    {Cookbook.Input$PageUrl}        .../wiki/Cookbook/Input
                                      or
                                    .../wiki?n=Cookbook.Input
                                    (depends on $EnablePathInfo setting)

> I found another error in the same jumpbox:
> Using the Jump to page button does not work.
> The markup needs this:
> 
> <form action='{$ScriptUrl}' method='post'>
> 
> $ScriptUrl instead of $PageUrl

Really, it doesn't work with $PageUrl?  I thought that PmWiki would
always prefer the 'n' parameter over any other source of pagename.


> And just to ease my mind:
> In pmwiki php {$ScriptUrl} is equivalent to $ScriptUrl, none is
> preferable above the other?

I generally choose {$ScriptUrl} simply because it makes it
clearer, and is more consistent with what appears in the markup.
But {$...} only works for page variables; if referring to
a global variable from a $...Fmt string, then don't use the
curly braces.

Pm




More information about the pmwiki-users mailing list