[pmwiki-users] Problem with conditional markup equal ?
Benjamin Grassineau
benjamingrassineau at gmail.com
Tue Mar 30 03:47:17 PDT 2021
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
More information about the pmwiki-users
mailing list