RedDot CMS “switch-case-alike” freakout!
Here's just a small code snippet which will fight down some of your daily RedDot horror moments:
XML:
-
<reddot:cms>
-
<if>
-
<query valuea="<%opt_fieldtype%>" operator="==" valueb="String:optionOne">
-
<htmltext>Case one</htmltext>
-
</query>
-
<query type="else">
-
<if>
-
<query valuea="<%opt_fieldtype%>" operator="==" valueb="String:optionTwo">
-
<htmltext>Case Two</htmltext>
-
</query>
-
<query type="else">
-
<if>
-
<query valuea="<%opt_fieldtype%>" operator="!=" valueb="String:noneOfTheAbove">
-
<htmltext>Default</htmltext>
-
</query>
-
</if>
-
</query>
-
</if>
-
</query>
-
</if>
-
</reddot:cms>
Ok, as a fact, it's just if and else, but you will learn to love it, I promise!!

Am 21. April 2008 um 07:58 Uhr
Hallo zusammen,
wer meine Variante des Codes sehen möchte, kann das ab jetzt im Blog der RDUG tun: http://www.rdug.de/blog/?p=37
Schöne Grüße
Daniel Kasimirowicz