I would like this feature, because at the moment when you use the taxonomy_menu, the RSS feeds are missing. When all links in the Taxonomy_menu block would point to real taxonomy terms, automatically the RSS feed would be included as <link rel="alternate" type="application/rss+xml" title="Category title" href="taxonomy/term/#/0/feed" /> or the XML button at the bottom of the page.
Comments
Comment #1
ñull commentedSee also forum thread: http://drupal.org/node/37382
Comment #2
eGroves commentedYou can replace the old taxonomy_menu_page function in taxonomy_menu.module with the following one. You will notice that is pretty close to the same, but I made a few changes for the RSS stuff. Enjoy!
/**
* Page callback that renders a node listing for the selected term.
*/
function taxonomy_menu_page() {
if (arg(2)) {
$arguments = explode('/', $_GET['q']);
$main_tid = db_escape_string(array_pop($arguments));
$tids[] = $main_tid;
$result = taxonomy_select_nodes(array($main_tid), 'or', variable_get('taxonomy_menu_display_descendants', 1) ? 'all' : 0);
}
else {
// If no arg(2), we're looking at just the vid. If display_descendants
// is on, grab all terms regardless of depth. If off, grab depth 0 terms.
$tree = taxonomy_get_tree(arg(1));
$descendants = variable_get('taxonomy_menu_display_descendants', 1);
foreach ($tree as $term) {
if ($descendants || $term->depth == 0) {
$tids[] = $term->tid;
}
}
// The requested terms have already been determined, so don't request
// descendants here.
$result = taxonomy_select_nodes($tids, 'or', 0);
}
drupal_add_link(array('rel' => 'alternate',
'type' => 'application/rss+xml',
'title' => 'RSS',
'href' => url('taxonomy/term/'. implode('+',$tids) .'/0/feed')));
print theme('page', taxonomy_render_nodes($result) . theme('xml_icon', url("taxonomy/term/". implode('+',$tids) ."/0/feed")));
}
Comment #3
brmassa commented