可能无法使用RSS feed。我发现可以在特定分类法之后添加/ feed来获取特定分类法的提要,但是如何从中添加/删除字段,在哪里可以找到该提要的“视图”?谢谢
回调从taxonomy.module
定义到hook_menu中:
$items['taxonomy/term/%taxonomy_term/feed'] = array(
'title' => 'Taxonomy term',
'title callback' => 'taxonomy_term_title',
'title arguments' => array(2),
'page callback' => 'taxonomy_term_feed',
'page arguments' => array(2),
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
'file' => 'taxonomy.pages.inc',
);
它调用函数taxonomy_term_feed
function taxonomy_term_feed($term) {
$channel['link'] = url('taxonomy/term/' . $term->tid, array('absolute' => TRUE));
$channel['title'] = variable_get('site_name', 'Drupal') . ' - ' . $term->name;
// Only display the description if we have a single term, to avoid clutter and confusion.
// HTML will be removed from feed description.
$channel['description'] = check_markup($term->description, $term->format, '', TRUE);
$nids = taxonomy_select_nodes($term->tid, FALSE, variable_get('feed_default_items', 10));
node_feed($nids, $channel);
}
将函数node_feed
调用到node.module
2575行
因此您可以分析这些功能以了解其工作原理并找到解决方案