[pmwiki-users] Conditionals in Pagelists and IE bug
Stirling Westrup
sti at pooq.com
Tue Nov 14 19:28:14 CST 2006
The Editor wrote:
> Third post. This is quite confusing. It should work. Am I missing something?
> Evidently the first conditional fails because all the pages come up
> black even when the specified page exists.
>
>
>> [[#chatroom]]
>> (:if exists "Chat-{=$Name}-Member.{$AuthId}":)
>> * %red%[[Chat.Chat?room={=$Name}|{=$Name}]]%%\\
>> (:if ! exists "Chat-{=$Name}-Member.{$AuthId}":)
>> * [[Chat.Chat?room={=$Name}|{=$Name}]]\\
>> (:ifend:)
>> [[#chatroomend]]
Complex page templates can get tricky to debug. Try modifying it to say
something like this:
[[#chatroom]]
testing "Chat-{=$Name}-Member.{$AuthId}"
(:if exists "Chat-{=$Name}-Member.{$AuthId}":)
test succeeded!
* %red%[[Chat.Chat?room={=$Name}|{=$Name}]]%%\\
(:if ! exists "Chat-{=$Name}-Member.{$AuthId}":)
test failed!
* [[Chat.Chat?room={=$Name}|{=$Name}]]\\
(:ifend:)
[[#chatroomend]]
The results might give you a clue. As well, you might try the test as
(:if exists Chat-{=$Name}-Member.{$AuthId}:)
without the quotes. That may just be causing it to literally look for a page
with quotes in its name.
More information about the pmwiki-users
mailing list