Add i18n for site_info.
Add always display site title. Changes for menu in front-end
This commit is contained in:
1 parent
e52119e258
commit
8b61314cc4
6 files changed
+47
-37
No files matched your search
@@ -112,7 +112,16 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def page_title(page)
|
||||
"<title>#{page.title ? page.title[I18n.locale] : page.i18n_variable[I18n.locale]}</title>\n"
|
||||
res = "<title>"
|
||||
page_title = page.title ? page.title[I18n.locale] : page.i18n_variable[I18n.locale]
|
||||
if page.is_home? && @site.title
|
||||
res << @site.title[I18n.locale]
|
||||
elsif @site.title && @site.title_always_on
|
||||
res << @site.title[I18n.locale] + ' - ' + page_title
|
||||
else
|
||||
res << page_title
|
||||
end
|
||||
res << "</title>\n"
|
||||
end
|
||||
|
||||
def page_stylesheets(page, edit=nil)
|
||||
@@ -123,6 +132,7 @@ module ApplicationHelper
|
||||
stylesheets << "<link href='/assets/style.css' rel='stylesheet' type='text/css' />\n"
|
||||
end
|
||||
stylesheets << "<link href='#{page.design.reset_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.reset_css
|
||||
# stylesheets << "<link href='/assets/menu.css' rel='stylesheet' type='text/css' />\n"
|
||||
stylesheets << "<link href='#{page.design.default_css.file.url}' rel='stylesheet' type='text/css' />\n" if page.design.default_css
|
||||
theme = page.design.themes.detect{ |d| d.id == page.theme_id }
|
||||
stylesheets << "<link href='#{theme.file.url}' rel='stylesheet' type='text/css' />\n" if theme
|
||||
|
||||
Reference in new issue
Block a user