<% sitemap.sort_by {|(key, option)| option.dig('_meta', 'nav_order') || 0 }.each do |(key, option)| %>
<% next if key == '_meta' %>
-
<%= option.dig('_meta', 'title') %>
<% option.sort_by {|(key, option)| option.dig('_meta', 'nav_order') || 0 }.each do |(key, option)| %>
<% next if key == '_meta' %>
- <%= option.dig('_meta', 'title') %>
<% end %>
<% end %>
Breadcrumbs: <% meta['breadcrumbs'].count.times do |i| %>
<% page = sitemap.dig(*meta['breadcrumbs'].take(i+1)) %>
<%= page.dig('_meta', 'title') %>
<% next if i+1 == meta['breadcrumbs'].count %>
/
<% end %>
<%= content %>
<% if meta['type'] == 'collection' %>
<% collection.sort_by {|(key, option)| option.dig('_meta', 'nav_order') || 0 }.each do |(key, option)| %>
<% next if key == '_meta' %>
- <%= option.dig('_meta', 'title') %>
<% end %>
<% end %>