[pmwiki-devel] Odd behaviour of link in if directive

Petko Yotov 5ko at 5ko.fr
Wed May 19 17:23:16 CDT 2010


On Wednesday 19 May 2010 13:06:54, Simon wrote :
> I'm wondering if the markup
> 
> (:if exists [[{$Name}-Talk]]:)Discussion: [[{$Name}-Talk]](:ifend:)
> 
> which is widely used in the cookbook
> 
> is now broken and must be fixed

Indeed. :-/

> (:if exists {$Name}-Talk:)Discussion: [[{$Name}-Talk]](:ifend:)
> 
> Could this have happened with the recent wildcard change?

Likely -- previously the string was normalized to become a valid pagename, 
automatically removing all non-pagename characters like [, *, ? etc. The new 
conditional expects a number of extra characters to have a meaning.

The previous conditional worked with brackets, but I don't think it was really 
designed for this. And in our documentation we have the correct line :

  (:if exists PAGENAME:)   -   true if the page pagename exists 

I wonder if there are wikis other than our Cookbook that rely on the previous 
conditional expression.

Petko



More information about the pmwiki-devel mailing list