Maybe I've missed something, but I don't see the if="test" syntax in the taglibs help at http://cookbook.hobocentral.net/api_tag_defs/a ...
Have you tried one of these approaches? <if test="&@user.administrator"> <a action="new" ...> </if> or <%= if @user.administrator %> <a action="new" ...> <%= end %> Frankly, I'm not sure either of these is correct, so I look forward to hearing what happens for you. I've been smacking my own head over conditionals in dryml, finding that it is very unpredictable what will and will not work. On Jun 15, 5:26 pm, hobo_hippy <[email protected]> wrote: > I'm modifying a card; > > <def tag="card" for="User"> > <card class="user" param="default" merge> > <header: param> > <h4 param="heading"><a><name/></a></h4> > <a action="new" if="@user.administrator==true" to="&model" > param="new-link"/> > </header:> > </card> > </def> > > I'd like the if statement to only let the button be visible if the > user is the administrator: > > <a action="new" if="@user.administrator==true" to="&model" param="new- > link"/> > > i also tried > > <a action="new" if="@user.administrator" to="&model" param="new-link"/ > > > > since user.administrator is a boolean anyway. Either way, I get: > > compile error > app/views/taglibs/application.dryml:20: syntax error > output_buffer.concat " "; concat((if ! > ([email protected]==true).blank?; (__tmp_1 = call_tag_parameter > (:a, {:action => "new", :to => (model)}, {}, > all_parameters, :new_link); Hobo::Dryml.last_if = true; __tmp_1) else > (Hobo::Dryml.last_if = false; ''); end)) ; output_buffer.concat "\n" > > I suppose I'm still unfamiliar with the data nomenclature. I'm sure > this is a quick fix so if anyone could shout out some help, I'd > appreciate it. > > THANKS! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
