Fix parser_front_end.rb for page content
This commit is contained in:
parent
4abe4f5c16
commit
19801eb10f
|
@ -32,13 +32,7 @@ module ParserFrontEnd
|
||||||
ret = ''
|
ret = ''
|
||||||
part = PagePart.find(front['part_id']) if front['part_id']
|
part = PagePart.find(front['part_id']) if front['part_id']
|
||||||
ret << eval("\"#{front['path']}\"") rescue ''
|
ret << eval("\"#{front['path']}\"") rescue ''
|
||||||
args.each do |index,arg|
|
ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args
|
||||||
if index=="tag_id" || index=="category_id"
|
|
||||||
ret << (ret.include?("?") ? "&#{index}[]=#{arg}": "?#{index}[]=#{arg}" )
|
|
||||||
else
|
|
||||||
ret << (ret.include?("?") ? "&#{index}=#{arg}": "?#{index}=#{arg}" )
|
|
||||||
end
|
|
||||||
end if args
|
|
||||||
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
|
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
|
||||||
end
|
end
|
||||||
front.swap(fragment)
|
front.swap(fragment)
|
||||||
|
|
Loading…
Reference in New Issue