Skip to content

Instantly share code, notes, and snippets.

@bhauman
Created July 30, 2009 16:28
Show Gist options
  • Save bhauman/158766 to your computer and use it in GitHub Desktop.
Save bhauman/158766 to your computer and use it in GitHub Desktop.
<% if page.page_type == LinkContent && page.open_link_in_new %>
<%= link_to page.name, page.link_url, :class => "nav_link", :target => '_blank' %>
<% elsif page.page_type == LinkContent %>
<%= link_to page.name, page.link_url, :class => "nav_link" %>
<% else %>
<%= link_to page.name, page_path(page), :class => "nav_link#{ ' dd_hidden_page' if page.hidden }#{ ' dd_has_sub_pages' if page.has_sub_pages }" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment