Sha256: a2a8cea0b5c2ead2cbadcaef4ac6b749d08b1900559c5a531482ff9d49b26684
Contents?: true
Size: 1.14 KB
Versions: 5
Compression:
Stored size: 1.14 KB
Contents
<ul> <% sitemap.sort_by {|(key, option)| option.dig('_meta', 'nav_order') || 0 }.each do |(key, option)| %> <% next if key == '_meta' %> <li> <a href="<%= option.dig('_meta', 'url') %>"><%= option.dig('_meta', 'title') %></a> <ul> <% option.sort_by {|(key, option)| option.dig('_meta', 'nav_order') || 0 }.each do |(key, option)| %> <% next if key == '_meta' %> <li><a href="<%= option.dig('_meta', 'url') %>"><%= option.dig('_meta', 'title') %></a></li> <% end %> </ul> </li> <% end %> </ul> Breadcrumbs: <% meta['breadcrumbs'].count.times do |i| %> <% page = sitemap.dig(*meta['breadcrumbs'].take(i+1)) %> <a href="<%= page.dig('_meta', 'url') %>"><%= page.dig('_meta', 'title') %></a> <% next if i+1 == meta['breadcrumbs'].count %> / <% end %> <%= content %> <% if meta['type'] == 'collection' %> <ul> <% collection.sort_by {|(key, option)| option.dig('_meta', 'nav_order') || 0 }.each do |(key, option)| %> <% next if key == '_meta' %> <li><a href="<%= option.dig('_meta', 'url') %>"><%= option.dig('_meta', 'title') %></a></li> <% end %> </ul> <% end %>
Version data entries
5 entries across 5 versions & 1 rubygems