[pmwiki-users] Problem with conditional markup equal ?

Dominique Faure dominique.faure at gmail.com
Wed Mar 31 12:52:00 PDT 2021


Hi,

You could also have a try with the MarkupExprPlus recipe :

First, you'll need to set the $EnableExprVarManip flag set in your
configuration in order to enable variable evaluation in expressions.

Then, instead of relying on two distinct expressions as you have in
the "equal" condition, you could use the {(test equal ...)} enclosing
expression which should evaluate as expected in one shot.

Regards,
Dominique

On Tue, Mar 30, 2021 at 12:48 PM Benjamin Grassineau
<benjamingrassineau at gmail.com> wrote:
>
> Hello list !
>
> I have a problem. I would like to test if two variables are equal to
> each other. One of them is stored in a page text variable, the other is
> "present" in the name of the page. It could be, more specifically, an
> existent or non-existent page (I desactivate the message of non-existent
> page, so, the "variable" is located in the adress bar).
>
>
> In the group header, I test this, for example :
>
> - The name of the page where I will execute the test :
> Utilisateurs/InitGYheJLMrKtest
>
> - The value of the page text variable called $:ptv : GYheJLMrK. It is
> located in Utilisateurs.test
>
> - the conditional test : (:if equal "{(substr '{*$Name}' 4 9)}"
> "{Utilisateurs.{(substr '{*$Name}' 13)}$:ptv} ] ":) Great ! (:if:)
>
>
> Problem : the conditional markup "equal" doesn't work ! I don't have
> "Great". It is strange because both expressions work, independently of
> the test. I have the good result which is displayed in both case
> (GYheJLMrK in this example).
>
> Apparently, the problem come from the second term {(substr '{*$Name}'
> 13)} (I eliminated the other candidates).
>
> Does anyone have an idea of the origin of the problem: just the
> syntax, sequence of execution, php version ...? I block !
>
> Thanks for your help.
>
> Benjamin
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users



More information about the pmwiki-users mailing list