Drupal 7 Drupal 7添加字段以在分类的RSS提要中显示
我在RSS提要方面有问题。我发现,我可以通过在特定分类法之后添加/feed来获取特定分类法的提要,但是如何才能从中添加/删除字段,我在哪里可以找到该提要的“视图”?Drupal 7 Drupal 7添加字段以在分类的RSS提要中显示,drupal-7,rss,drupal-taxonomy,Drupal 7,Rss,Drupal Taxonomy,我在RSS提要方面有问题。我发现,我可以通过在特定分类法之后添加/feed来获取特定分类法的提要,但是如何才能从中添加/删除字段,我在哪里可以找到该提要的“视图”? 谢谢回调是从分类法定义到hook_菜单中的。模块: $items['taxonomy/term/%taxonomy_term/feed'] = array( 'title' => 'Taxonomy term', 'title callback' => 'taxonomy_term_title',
谢谢回调是从分类法定义到hook_菜单中的。模块:
$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\u term\u 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\u feed
进入node.module
第2575行
因此,您可以分析这些函数以了解其工作原理并找到解决方案您是否尝试查看创建此视图的模块?可能提供了一些钩子来覆盖渲染或数据预渲染是否可以覆盖它,或向其中添加一些内容?它的系统模块,我不能简单地编辑它,我想您可以添加一个drupal_alter()函数来更改数据,而不必更改core/contrib模块