Change the way links are displayed in menus in front-end
This commit is contained in:
1 parent
6c83b3f9ae
commit
8fcb8ef8de
3 files changed
+16
-4
No files matched your search
@@ -27,7 +27,8 @@ module ParserCommon
|
||||
res << "_#{i}" if i
|
||||
res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page))
|
||||
res << "'>"
|
||||
res << "<a href='/#{edit ? admin_page_path(page.id) : page.path}'><span>#{page.i18n_variable[I18n.locale]}</span></a>"
|
||||
root = "/"
|
||||
res << "<a href='#{edit ? root + admin_page_path(page.id) : (page._type.eql?('Page') ? root + page.path : page.url)}'><span>#{page.i18n_variable[I18n.locale]}</span></a>"
|
||||
if page.visible_children.size > 0 && current <= menu.levels
|
||||
res << "<span class='dot'></span>"
|
||||
res << menu_level(page, current_page, current + 1, menu, edit)
|
||||
@@ -119,7 +120,8 @@ module ParserCommon
|
||||
res << "<ul class='list'>"
|
||||
menu_page.visible_children.each do |child|
|
||||
res << "<li class='#{page.id.eql?(child.id) ? 'active' : nil}'>"
|
||||
res << "<a href='/#{edit ? admin_page_path(child.id) : child.path}'>#{child.i18n_variable[I18n.locale]}</a>"
|
||||
root = "/"
|
||||
res << "<a href='#{edit ? root + admin_page_path(child.id) : (child._type.eql?('Page') ? root + child.path : child.url)}'>#{child.i18n_variable[I18n.locale]}</a>"
|
||||
res << "</li>"
|
||||
end
|
||||
res << "</ul>"
|
||||
|
||||
Reference in new issue
Block a user