forked from saurabh/orbit4-5
small fix for page render
This commit is contained in:
parent
0623541d94
commit
03822379b2
|
@ -317,7 +317,9 @@ class PagesController < ApplicationController
|
|||
@part_partials.each do |key, partial|
|
||||
html_string = ""
|
||||
partial.each do |p|
|
||||
html_string = html_string + p
|
||||
if !p.nil?
|
||||
html_string = html_string + p
|
||||
end
|
||||
end
|
||||
pp = doc.css("*[#{key}]")
|
||||
if !pp.blank?
|
||||
|
|
|
@ -22,7 +22,7 @@ module ApplicationHelper
|
|||
header = Nokogiri::HTML(header_file_html, nil, "UTF-8")
|
||||
sub_menu_html = site.sub_menu
|
||||
html = header.to_s
|
||||
html = html.gsub("{{site_name}}",site.title)
|
||||
html = html.gsub("{{site_name}}",(site.title rescue ""))
|
||||
html = html.gsub("%7B%7Blogo_url%7D%7D",(site.site_logo.url.nil? ? "/assets/site-logo.png" : site.site_logo.url))
|
||||
if site.sitemap_menu_in_header
|
||||
sub_menu_html = sub_menu_html + "<a href='/#{I18n.locale.to_s}#{site.site_map_link}'>Sitemap</a>"
|
||||
|
|
Loading…
Reference in New Issue