Fix [again] error in parser for category
This commit is contained in:
parent
ee59228665
commit
82a8f99208
|
@ -19,7 +19,6 @@ module ParserFrontEnd
|
||||||
end
|
end
|
||||||
|
|
||||||
def parse_page_content(page)
|
def parse_page_content(page)
|
||||||
category = params[:category_id].blank? ? page[:category] : params[:category_id]
|
|
||||||
tag = params[:tag_id].blank? ? page[:tag] : params[:tag_id]
|
tag = params[:tag_id].blank? ? page[:tag] : params[:tag_id]
|
||||||
body = Nokogiri::HTML(page.content)
|
body = Nokogiri::HTML(page.content)
|
||||||
body.css('orbit_front').each do |front|
|
body.css('orbit_front').each do |front|
|
||||||
|
@ -120,7 +119,7 @@ module ParserFrontEnd
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
options = "&page_id=#{page.id}&category_id=\#{category}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}&item_type=page"
|
options = "&page_id=#{page.id}&category_id=\#{page[:category]}&tag_id=\#{tag}&preview=\#{params[:preview]}&page_main=\#{params[:page_main]}&search_query=\#{params[:search_query]}&name=\#{params[:name]}&item_type=page"
|
||||||
ret << "<orbit_front path='#{url + options}'></div>"
|
ret << "<orbit_front path='#{url + options}'></div>"
|
||||||
else
|
else
|
||||||
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
|
part = page.page_parts.detect{ |p| p.name.to_s == content['name'].to_s } rescue nil
|
||||||
|
@ -137,7 +136,7 @@ module ParserFrontEnd
|
||||||
else
|
else
|
||||||
"/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true"
|
"/panel/\#{part.module_app.key}/widget/\#{part.widget_path}?inner=true"
|
||||||
end
|
end
|
||||||
options = "&part_id=\#{part.id}&category_id=\#{!part[:category].blank? ? part[:category] : category}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part"
|
options = "&part_id=\#{part.id}&category_id=\#{part[:category]}&tag_id=\#{!part[:tag].blank? ? part[:tag] : tag}&page=\#{params[:page]}&search_query=\#{params[:search_query]}&part_title=\#{Rack::Utils.escape(part_title).gsub(\"\+\", \"\%20\") rescue nil}&item_type=page_part"
|
||||||
ret << "<orbit_front path='#{url + options}' part_id=#{part.id} class='dymanic_load widget'></orbit_front>"
|
ret << "<orbit_front path='#{url + options}' part_id=#{part.id} class='dymanic_load widget'></orbit_front>"
|
||||||
|
|
||||||
when 'public_r_tag'
|
when 'public_r_tag'
|
||||||
|
|
Loading…
Reference in New Issue