site title now rendering from site info with page title

This commit is contained in:
Harry Bomrah 2014-06-30 17:11:41 +08:00
parent 14402d44fa
commit 3155c44a5e
1 changed files with 13 additions and 0 deletions

View File

@ -31,6 +31,19 @@ module ApplicationHelper
html.html_safe html.html_safe
end end
def render_site_title
site = Site.first
title = site.title rescue ""
if site.title_always_on
if !params[:slug].nil?
temp_title = params[:slug].sub("-#{params[:uid]}","")
temp_title = temp_title.gsub("-"," ")
title = "#{temp_title} | #{title}"
end
end
title
end
def render_footer def render_footer
site = Site.first site = Site.first
footer_file = File.join('../templates', "#{@key}", "/home/footer.html.erb") footer_file = File.join('../templates', "#{@key}", "/home/footer.html.erb")