Probably be simpler to just use erb for these edge cases with elsif or a case statement as appropriate. That or a view helper.
On Mar 11, 1:45 pm, Scott Bronson <[email protected]> wrote: > I rarely use the if tag, usually preferring to put conditionals into > attributes. > > Today, though, I have a whole bunch of alternatives that I need to test. > > <if test="&this.complete?"> > <view ...> > </if><else> > <if test="&this.confirmed?"> > <view ...> > </if><else> > <if test="&this.pending?"> > <view...> > </if><else> > <if test="&this.active?"> > <view ...> > </if><else> > Unknown > </else> > </else> > </else> > </else> > > Not so pretty. Would it make sense to add an elsif tag to dryml core? > > <if test="&this.complete?"> > <view ...> > </if><elsif test="&this.confirmed?"> > <show ...> > </elsif><elsif test="&this.pending?"> > <other...> > </elsif><elsif test="&this.active?"> > <stuff ...> > </elsif><else> > Unknown > </else> > > Or is there a better way to write this in dryml? > > (I know, I know, use polymorphic tags... in this case, it would > actually make things more obscure) > > - Scott --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
