Hey all. I am trying to insert a pipe character at the end of a few
lines of HAML to separate menu items, and am struggling mightily. I
got it to work with some crazy hacks, but there has got to be a better
way. Right now the code for the menu looks like this:
      %li
        != "#{link_to("Home", "/")} | "
      %li
        != "#{link_to("About", "about")} | "
      %li
        != "#{link_to("Submit Data", new_raw_data_set_path)} | "
      %li
        != "#{link_to("Search", search_path)} | "
      %li
        != "#{link_to("Browse", raw_data_sets_path)}"

As you can see, I have had to embed ruby in a string, and escape the
HTML to produce a pipe character between each menu item. Is there a
better way I can do this? I keep getting tripped up by the fact that
HAML interprets the pipe as a signal for a multiline string  when it
is not embedded in Ruby code like this. Thanks for your help.

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" 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/haml?hl=en.

Reply via email to