Fixed Submenu

This commit is contained in:
saurabhbhatia 2013-11-15 14:47:08 +08:00
parent 8f3a68b3d7
commit 7028390248
1 changed files with 10 additions and 2 deletions

View File

@ -1,11 +1,19 @@
<% if @menu_page && @menu_page.visible_children.size > 0 %>
<% if @menu_page %>
<div class='category_list'>
<!-- <h3 class='h3'><%#= @menu_page.title %></h3> -->
<ul class='list'>
<% @menu_page.visible_children.each do |child| %>
<% if @menu_page.visible_children.nil?%>
<p>Test</p>
<li class="<%= @page_id.eql?(child.parent.id) ? 'active' : nil %>">
<a href="<%= (child.parent.class.to_s.eql?('Page') ? '/' + child.parent.path : child.parent.url) %>"><%= child.parent.title %></a>
</li>
<% else %>
<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 %>
<% end %>
</ul>
</div>