Hello there, this is the second time i post this question on this mailinglist, because i haven't had any reactions the previous time and in the meanwhile i still could not find a solution myself, so here we go again (for a last attempt, don't worry ;-):
I am trying to show different images, dependent on some conditions:
Scenario 1: if the current page(name) is the same as a given pagename, image_1.gif is shown. Scenario 2: if the current page(name) is not the same as the given pagename, the existence of the given pagename is checked: Scenario 2a: if the given pagename exists, image_2a.gif is shown. Scenario 2b: if the given pagename does not exist, image_2b.gif is shown.
So i wrote: {{if: {{ifeq: {{NAMESPACE}}:{{PAGENAME}} | {{NAMESPACE}}:{{BASEPAGENAME}}/subpage | true }} | [[Image = image_1.gif]] | {{ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}/subpage | [[Image = image_2a.gif]] | [[Image = image_2b.gif]] }} }}
The problem is that image_1.gif does not appear, even if {{NAMESPACE}}:{{PAGENAME}} has the same value as {{NAMESPACE}}:{{BASEPAGENAME}}/subpage (e.g. image_2a.gif appears then instead, because the given pagename {{NAMESPACE}}:{{BASEPAGENAME}}/subpage" exists). Does the parserfunction "ifeq" compares the values litterally without interpreting the magicwords?
I don't think there is any mistake in the above wiki-code because when i substitute "{{NAMESPACE}}:{{PAGENAME}}" by "a" and {{NAMESPACE}}:{{BASEPAGENAME}}/subpage" by "a", so that the comparison is "a=a" (which is true) the image_1.gif is correctly displayed.
Does anyone know whether the magicwords in the parserfunction "ifeq" are recognized and what the cause of the problem is? If this parserfunction does not interpret magic words, is there another solution to display image_1.gif in case the pagename is the same as a given pagename?
Thanks in advance!
B.
mediawiki-l@lists.wikimedia.org