I am designing a blog with 5 categories which can be viewed by category or all at once. I'm using views with a single word grammar to classify my posts into the 5 categories.

I'm using the Views RSS module to provide RSS syndication for each category, and also for the entire blog (1+2+3+4+5). But the way views seems to be set up (I added 'RSS: RSS Feed Selector' under Arguments), there is only one static title for the RSS feed. So 'mysite.com/taxonomy/1/feed' is titled 'My Feed' and so is 'mysite.com/taxonomy/2/feed' and so is 'mysite.com/taxonomy/1+2+3+4+5/feed'. Is there any way to modify the title based on the category (taxonomy term) name? So 1 would be titled 'Company' and 1+2+3+4+5 would be titled 'All.'

I hope that makes sense. Thanks in advance if anyone can help me!

Comments

aasarava’s picture

Sorry if this is too late to help you, but hopefully others with similar problems will find it useful:

I've found that if you want a feed title that's different from the regular page title, you can change it by editing the view and adding some code to the Argument Handling section. For a simple title change, the code would look like this:

if($args[0] == 'feed') {
  $view->page_title = 'The Title of My RSS Feed';
}
return $args;

(Remember that in argument handling code, you actually do NOT put the opening and closing php tags around the code. Also, I think it's a requirement that you have to check the box to enable a Block for your view in order to get the argument handling code to work.)

Basically, all the code is doing is checking the URL to see if you're on the "feed" page, and then dynamically changing the page title. To have a different title for different taxonomies, add more if-statements accordingly.

Hope that helps,
-A

GROL’s picture

Could anyone specify where is "Argument Handling section" in Drupal 6?