If I understand correctly, the current approach for theming the RSS feed icon works as follows:

  • If the feed has a URL, then the RSS feed icon is added to the $feed_icons variable, which is accessible from page.tpl.php. The default behaviour is that the feed_icons are displayed at the bottom of the page, but this can obviously be changed by editing page.tpl.php.
  • If the feed does not have a URL, then the RSS feed icon is added to the $feed_icon variable for the view (i.e. accessible from views-view.tpl.php). This allows the RSS icon to be added inside a block for example.

For my site, I would like to be able to position the RSS feed icon inside the view for a page-display view (i.e. a view with a URL). I would like to place the icon at the top of the content, but I have exposed filters and a heading to the view, so this cannot be achieved from inside page.tpl.php. I have tried using the $feed_icon variable in views-view.tpl.php, but because of the logic explained above, this variable is not populated.

As far as I can tell, I have two choices if I want to do this:

  1. Edit views_plugin_style_rss.inc:24 so that the feed icon is always added to the views $feed_icon variable (I've tried this and it works)
  2. Use absolute positioning in CSS to push the icon down to the right place on the page. This is not ideal as I would have to change the CSS if the heading or exposed filters for the view is changed

Have I missed a third option? If not, is there a reasonable requirement here to make it customisable from the Views admin whether the feed icon is pushed to page.tpl.php or views-view.tpl.php?

Comments

iamjon’s picture

nicks,
this is something that could be made configurable for the user.
do you have a patch for suggestion #1 and an idea how you would envision the ui for making it customizable for the user.

iamjon’s picture

Category: feature » task

changing status to task

kars-t’s picture

Status: Active » Fixed

Hi

I am setting this task to fixed because it is very old now. And I do not really understand the problem for Views here because you could easily add the icon to some theme and create a link. You can't do everything with Views and some things should just be done with the theming layer. If you have a more clear way how to implement this please reopen this issue.

Status: Fixed » Closed (fixed)
Issue tags: -RSS

Automatically closed -- issue fixed for 2 weeks with no activity.