2016-07-31 19:28:23 +02:00
|
|
|
module NavigationHelper
|
|
|
|
def nav_items
|
2016-10-03 22:33:52 +02:00
|
|
|
navigables = items.select { |i| i[:navigable] }.sort_by { |x| x[:order] || 10000 }
|
2016-07-31 19:28:23 +02:00
|
|
|
|
|
|
|
navigables.each do |item|
|
|
|
|
is_active = @item_rep && @item_rep.path == item.path
|
|
|
|
yield item, is_active
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|