[pmwiki-users] EnableRelativePageVars in beta releases

Patrick R. Michaud pmichaud at pobox.com
Fri Dec 8 11:57:34 CST 2006


On Fri, Dec 08, 2006 at 10:22:23AM -0500, Scott Connard wrote:
> I was wondering why you didn't add conditional code to your beta  
> release pages so that people could run with those pages regardless of  
> their setting of $EnableRelativePageVars.

The pages that come with the beta release distribution already 
work regardless of the setting of $EnableRelativePageVars --
at least, they're supposed to.  Could you give an example
where they aren't working?

Looking at one of your examples:

    wikilib.d/Site.PageNotFound:
    7c7,8
    < (:if auth edit:)%rel=nofollow% ([[{$FullName}?action=edit | Create  
    {$FullName}]])
    ---
    > (:if ( ! enabled EnableRelativePageVars && auth edit ) :)%rel=nofollow% ([[{$FullName}?action=edit | Create {$FullName}]])
    > (:if ( enabled EnableRelativePageVars && auth edit ) :)%rel=nofollow% ([[{*$FullName}?action=edit | Create {*$FullName}]])

The test for EnableRelativePageVars isn't needed.  {*$FullName}
always gives the correct answer, even if $EnableRelativePageVars
is disabled.

Or, stated differently, if $EnableRelativePageVars isn't set,
then {*$FullName} and {$FullName} produce the same results, so
in 2.2.0 one can always use {*$FullName} to mean "currently
browsed page".

Pm




More information about the pmwiki-users mailing list