修復feed抓不到title
This commit is contained in:
parent
53c07e53fe
commit
0b4f634460
|
@ -33,12 +33,12 @@
|
||||||
if now_index != 0
|
if now_index != 0
|
||||||
prev_result = sorted[now_index-1]
|
prev_result = sorted[now_index-1]
|
||||||
prev_url = params['url'] + '/' + prev_result.to_param
|
prev_url = params['url'] + '/' + prev_result.to_param
|
||||||
prev_content = "<a href='#{prev_url}' title='#{t('announcement.prev')}' class='prev'><b>#{t('announcement.prev')}</b><p>#{prev_result['title'][I18n.locale]}</p></a>"
|
prev_content = "<a href='#{prev_url}' title='#{t('announcement.prev')}' class='prev'><b>#{t('announcement.prev')}</b><p>#{prev_result['title'].is_a?(String) ? prev_result['title'] : prev_result['title'][I18n.locale]}</p></a>"
|
||||||
end
|
end
|
||||||
if now_index != sorted.length-1
|
if now_index != sorted.length-1
|
||||||
next_result = sorted[now_index+1]
|
next_result = sorted[now_index+1]
|
||||||
next_url = params['url'] + '/' + next_result.to_param
|
next_url = params['url'] + '/' + next_result.to_param
|
||||||
next_content = "<a href='#{next_url}' title='#{t('announcement.next')}' class='next'><b>#{t('announcement.next')}</b><p>#{next_result['title'][I18n.locale]}</p></a>"
|
next_content = "<a href='#{next_url}' title='#{t('announcement.next')}' class='next'><b>#{t('announcement.next')}</b><p>#{next_result['title'].is_a?(String) ? next_result['title'] : next_result['title'][I18n.locale]}</p></a>"
|
||||||
end
|
end
|
||||||
if prev_content != '' || next_content != ''
|
if prev_content != '' || next_content != ''
|
||||||
content = "<div class='see_more_boxTitle'>#{prev_content}#{next_content}</div>".html_safe
|
content = "<div class='see_more_boxTitle'>#{prev_content}#{next_content}</div>".html_safe
|
||||||
|
|
Loading…
Reference in New Issue