Issue Details (XML | Word | Printable)

Key: CODEBASE-132
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Jonathan Rochkind
Reporter: Jason Ronallo
Votes: 0
Watchers: 0
Operations

Clone this issue
If you were logged in you would be able to see more operations.
Blacklight Plugin

RSS feed link could be included in default application layout

Created: 01/Jun/09 03:21 PM   Updated: 19/May/10 11:05 AM
Component/s: None
Affects Version/s: None
Fix Version/s: 2.6

Issue Links:
pre-requisite
 


 Description  « Hide
Currently the RSS feed that is available in Blacklight does not advertise itself in the default application layout. Something like the following code (I couldn't find a rails way to do a link_tag) can be added to advertise the rss feed. Place within the head tags.

 <link rel='alternate' href="<%= catalog_index_path(:params=> params, :format => :rss) %>" type="application/rss+xml" title="rss feed" />

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jason Ronallo added a comment - 01/Jun/09 04:11 PM
There might be a cleaner way to do this but it should probably only be present on the catalog index pages like so:

<% if params[:controller] == 'catalog' and params[:action] == 'index'%>
      <link rel='alternate' href="<%= catalog_index_path(:params=> params, :format => :rss) %>" type="application/rss+xml" title="rss feed" />
<% end %>

Jonathan Rochkind added a comment - 19/May/10 11:05 AM
Auto-discovery link for RSS now included in index view.

Done using new extra_head_content, in controller rather than view. Wasn't sure whether it was best to put it in controller or view, opted for controller because this way it'll show up in people's custom views without changes, so long as they call the head content helper.

Note that until the RSS feed is actually fixed to not use hard coded Solr stored fields, the RSS feed may not actually work.