Fix site map and menu order

This commit is contained in:
chris 2012-12-28 11:37:37 +08:00
parent 17d93409b3
commit 37309a452d
3 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ class FrontController < ApplicationController
res << "'>"
i = nil
i = 1 if menu.values["li_incremental_#{current}"]
children = current == 1 ? page.visible_children.reverse : page.visible_children
children = current == 1 ? page.visible_children : page.visible_children
children.each do |child|
res << menu_li(child, current_page, current, menu, i)
i += 1 if i

View File

@ -56,7 +56,7 @@ class Item
end
def show_in_sitemap_for(locale)
if !sitemap_enabled[locale].blank?
if sitemap_enabled && !sitemap_enabled[locale].blank?
sitemap_enabled[locale].eql?('true') ? true : false
else
true

View File

@ -9,7 +9,7 @@ module ParserCommon
res << "'>"
i = nil
i = 1 if menu.values["li_incremental_#{current}"]
children = current == 1 ? page.visible_children.reverse : page.visible_children
children = current == 1 ? page.visible_children : page.visible_children
children.each do |child|
res << menu_li(child, current_page, current, menu, i, edit)
i += 1 if i