You are here

function aggregator_page_category in Drupal 7

Same name and namespace in other branches
  1. 4 modules/aggregator.module \aggregator_page_category()
  2. 5 modules/aggregator/aggregator.module \aggregator_page_category()
  3. 6 modules/aggregator/aggregator.pages.inc \aggregator_page_category()

Page callback: Displays all the items aggregated in a particular category.

Parameters

$category: The category for which to list all of the aggregated items.

Return value

The rendered list of items for the feed.

1 call to aggregator_page_category()
aggregator_page_category_form in modules/aggregator/aggregator.pages.inc
Page callback: Displays a form containing items aggregated in a category.
1 string reference to 'aggregator_page_category'
aggregator_menu in modules/aggregator/aggregator.module
Implements hook_menu().

File

modules/aggregator/aggregator.pages.inc, line 68
User page callbacks for the Aggregator module.

Code

function aggregator_page_category($category) {
  drupal_add_feed('aggregator/rss/' . $category['cid'], variable_get('site_name', 'Drupal') . ' ' . t('aggregator - @title', array(
    '@title' => $category['title'],
  )));

  // It is safe to include the cid in the query because it's loaded from the
  // database by aggregator_category_load.
  $items = aggregator_feed_items_load('category', $category);
  return _aggregator_page_list($items, arg(3));
}