This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/views/front/show_page_sub_menu.html.erb

24 lines
865 B
Plaintext

<% if @menu_page.children.present? %>
<div class='category_list'>
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
<ul class='list'>
<% @menu_page.visible_children.each do |child| %>
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
</li>
<% end %>
</ul>
</div>
<% else %>
<div class='category_list'>
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
<ul class='list'>
<% @menu_page.parent.parent.visible_children.each do |child| %>
<li class="<%= @page_id.eql?(child.id) ? 'active' : nil %>">
<a href="<%= (child.class.to_s.eql?('Page') ? '/' + child.path : child.url) %>"><%= child.title %></a>
</li>
<% end %>
</ul>
</div>
<% end %>