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:
  1. <reddot:cms>
  2.   <if>
  3.     <query valuea="<%opt_fieldtype%>" operator="==" valueb="String:optionOne">
  4.       <htmltext>Case one</htmltext>
  5.     </query>
  6.     <query type="else">
  7.       <if>
  8.         <query valuea="<%opt_fieldtype%>" operator="==" valueb="String:optionTwo">
  9.           <htmltext>Case Two</htmltext>
  10.         </query>
  11.         <query type="else">
  12.           <if>
  13.             <query valuea="<%opt_fieldtype%>" operator="!=" valueb="String:noneOfTheAbove">
  14.               <htmltext>Default</htmltext>
  15.             </query>
  16.           </if>
  17.         </query>
  18.       </if>
  19.     </query>
  20.   </if>
  21. </reddot:cms>

Ok, as a fact, it's just if and else, but you will learn to love it, I promise!!

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5 out of 5)
Loading ... Loading ...

Eine Reaktion zu “RedDot CMS “switch-case-alike” freakout!”

  1. Daniel K.

    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