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

Collapse
Posted by Jeff Davis on
Lars, shouldn't your construct be
<if @foobar@ true>
    ...
</if>
<elseif @baz@ eq "greble">
  ...
</elseif>
...
<else>
  ...
</else>
(and we probably should add an elseif tag).
Collapse
Posted by Dan Wickstrom on
Looking in tag-init.tcl, I see that an elseif tag already exists, but I'm not sure why nobody ever uses it.  I sorta of recall a discussion in the past where it was mentioned that there were some problems with elseif, but looking at they code I don't see anything wrong with it.... and giving it a short test, I find that it does indeed work.
Collapse
Posted by Jeff Davis on
It looks like this was in the original import but never got documented.  That will teach me to use the templating documentation to check which tags exist :)