front_end widget breadcrumb done
This commit is contained in:
1 parent
2a61470f8b
commit
bca4478f68
4 files changed
+21
-7
No files matched your search
@@ -3,7 +3,7 @@ class FrontController < ApplicationController
|
||||
layout false
|
||||
|
||||
def show_breadcrumb
|
||||
@ancestors = Page.find(params[:menu_page_id]).ancestors_and_self.map{|m|m.title_translations[locale]}.delete_at(0) rescue []
|
||||
@ancestors = Page.find(params[:page_id]).ancestors_and_self
|
||||
@ancestors.delete_at(0)
|
||||
end
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<% if not @ancestors.empty? %>
|
||||
<div class='category_list'>
|
||||
<ul class='list'>
|
||||
<%= @ancestors.each do |node| %>
|
||||
<% @ancestors.each do |node| %>
|
||||
<li class='active'>
|
||||
<%= link_to node.title, (node.class.to_s.eql?('Page') ? '/' + node.path : node.url) %>
|
||||
<%= link_to node.title, "/#{node.path}" %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
Reference in new issue
Block a user