Forum OpenACS Development: Re: New template tags - switch statement

Collapse
Posted by Ola Hansson on
Way to go, Dan.

Can I ask for a feature? 😉

Do you think it could be made to work something like this (if it doesn't already):

<switch @switch_var@>
    <case value="foo" value="bar" value="baz">
        You selected Foo or Bar or Baz
    </case>
    <case value="blargh">
        You selected blargh
    </case>
    <default>
        Your selection was invalid
    </default>
</switch>
I am sure your <switch> tag will come in handy in many places.

/Ola