[pmwiki-users] Pagelist definition problem (fixed?)
Patrick R. Michaud
pmichaud at pobox.com
Fri Oct 6 11:18:22 CDT 2006
On Fri, Oct 06, 2006 at 10:52:56AM -0400, Crisses wrote:
> I get a list in the right format, but the part I want to group on
> just repeats:
>
> http://similepedia.com/index.php/Category/Period-20thCentury
> http://similepedia.com/index.php/Category/Publisher-PenguinBooks
******ICK!*******
I found part of the problem, and it's ugly.
It's the 'and' in "Of Mice and Men" that is messing things up.
The complex expression parser doesn't (yet?) recognize quotes --
it just separates things based on the predefined operators
&& || ( ) ! and or xor
So, since {$:Work} contains the string ' and ', it's being treated
as an operator in the complex expression and breaking the expression.
In the case of [[#othercatlist]] we're ending up with (I'll just
do a single expression here):
(:if expr ( ! equal "Of Mice and Men" "Of Mice and Men" ) :)
which the "expr" condition sees as:
( ( ! equal "Of Mice ) and ( Men" "Of Mice ) and ( Men" ) )
which ends up always evaluating to true. (Please don't ask me
why. :-)
So, it looks like I'll have to get the complex expressions parser
to recognize quotes in order for this to work.
In the case of [[#authorcatlist]], there aren't any quotes
around the page text variables, so that after substitution the
(:if:) condition ultimately looks like:
(:if ! equal Of Mice and Men Of Mice and Men :)
Since "Of" is not the same as "Mice", it always evaluates
to true. Try putting quotes around the page text variables
in the (:if:) condition and see if that fixes things.
Pm
More information about the pmwiki-users
mailing list