Skip to content

Instantly share code, notes, and snippets.

@Sheeo
Created February 24, 2011 20:55
Show Gist options
  • Save Sheeo/842866 to your computer and use it in GitHub Desktop.
Save Sheeo/842866 to your computer and use it in GitHub Desktop.
<% content_for :nav do %>
<ul>
<%
items = ["Forside", "Rediger quiz", "Kategorier", "Spilrunder"]
descriptions = ["Gå til forsiden", "Rediger en quiz", "Opsæt kategorier", "Vælg spilrunder"]
items.each_index do |key|
item = items[key]
item_description = descriptions[key]
if !is_active_page?(:key)
%>
<li><div><%= item %></div><small><%= item_description %></small></li>
<%
else
%>
<li clas="selected"><div><b></b><%= item %></div><small><%= item_description %></small></li>
<%
end
end
%>
</ul>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment