fixed external links opening in different window

This commit is contained in:
Harry Bomrah 2013-09-17 15:51:46 +08:00 committed by saurabhbhatia
parent bf1060d1eb
commit 8398c9f829
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ class FrontController < ApplicationController
res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page)) res << " active" if (current_page.id.eql?(page.id) || current_page.descendant_of?(page))
res << "'>" res << "'>"
root = "/" root = "/"
res << "<a href='#{(page.class.to_s.eql?('Page') ? root + page.path : page.url)}'><span>#{page.title}</span></a>" res << "<a href='#{(page.class.to_s.eql?('Page') ? root + page.path : page.url)}' target=#{(page.class.to_s.eql?('Page') ? '_self' : '_blank')} ><span>#{page.title}</span></a>"
if page.visible_children.size > 0 && current < menu.levels if page.visible_children.size > 0 && current < menu.levels
res << "<span class='dot'></span>" res << "<span class='dot'></span>"
res << menu_level(page, current_page, current + 1, menu) res << menu_level(page, current_page, current + 1, menu)