[pmwiki-users] Bug in functions PageTextVar or Qualify?

Petko Yotov 5ko at 5ko.fr
Sun Apr 27 02:55:24 CDT 2008

On Sunday 27 April 2008, Hans wrote:
> noskule reported to me a possible bug which showed up when using FoxEdit
> to load PTVs into an edit form, but which is not related to fox or
> foxedit.
> When PageTextVar is called, and the PTV value contains {$FullName}, the
> returned string for {$FullName} is expanded to
> {GroupName.PageName$FullName}
> OTOH when the value contains string {*$FullName} it is returned as
> {*$FullName}

This is not a bug but the expected behavior. We are expecting, by convention:

  {*$FullName} = the page that is being viewed, even if this piece of
      code comes from an included/sidebar/header/footer page.

  {$FullName} = the physical page where the code is written, the
     included/sidebar/header/footer page if the piece of code is there.
     That's why it is expanded to {Group.Page$FullName} as if, 
     in the page, you wrote it this way yourself.

It is possible to disable the Qualify function by setting in config.php: 
  $EnableRelativePageVars = 0;

This way {$FullName} will behave like {*$FullName} (and not vice-versa).


More information about the pmwiki-users mailing list