Fix parser_front_end.rb for page content

This commit is contained in:
chris 2013-09-17 18:00:30 +08:00 committed by saurabhbhatia
parent 051adbf167
commit 19633a05d8
1 changed files with 1 additions and 7 deletions

View File

@ -32,13 +32,7 @@ module ParserFrontEnd
ret = ''
part = PagePart.find(front['part_id']) if front['part_id']
ret << eval("\"#{front['path']}\"") rescue ''
args.each do |index,arg|
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
ret << (ret.include?("?") ? "&#{args.to_param}" : "?#{args.to_param}") if args
fragment = Nokogiri::HTML::DocumentFragment.new(body, "<div class='dymanic_load widget' path='#{ret}'></div>")
end
front.swap(fragment)