aggregator-item.tpl.php

  1. 7.x drupal-7.x/modules/aggregator/aggregator-item.tpl.php
  2. 6.x drupal-6.x/modules/aggregator/aggregator-item.tpl.php

Default theme implementation to format an individual feed item for display on the aggregator page.

Available variables:

  • $feed_url: URL to the originating feed item.
  • $feed_title: Title of the feed item.
  • $source_url: Link to the local source section.
  • $source_title: Title of the remote source.
  • $source_date: Date the feed was posted on the remote source.
  • $content: Feed item content.
  • $categories: Linked categories assigned to the feed.

See also

template_preprocess()

template_preprocess_aggregator_item()

2 theme calls to aggregator-item.tpl.php
aggregator_categorize_items in drupal-7.x/modules/aggregator/aggregator.pages.inc
Form constructor to build the page list form.
_aggregator_page_list in drupal-7.x/modules/aggregator/aggregator.pages.inc
Prints an aggregator page listing a number of feed items.

File

drupal-7.x/modules/aggregator/aggregator-item.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to format an individual feed item for display
  5. * on the aggregator page.
  6. *
  7. * Available variables:
  8. * - $feed_url: URL to the originating feed item.
  9. * - $feed_title: Title of the feed item.
  10. * - $source_url: Link to the local source section.
  11. * - $source_title: Title of the remote source.
  12. * - $source_date: Date the feed was posted on the remote source.
  13. * - $content: Feed item content.
  14. * - $categories: Linked categories assigned to the feed.
  15. *
  16. * @see template_preprocess()
  17. * @see template_preprocess_aggregator_item()
  18. *
  19. * @ingroup themeable
  20. */
  21. ?>
  22. <div class="feed-item">
  23. <h3 class="feed-item-title">
  24. <a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a>
  25. </h3>
  26. <div class="feed-item-meta">
  27. <?php if ($source_url): ?>
  28. <a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> -
  29. <?php endif; ?>
  30. <span class="feed-item-date"><?php print $source_date; ?></span>
  31. </div>
  32. <?php if ($content): ?>
  33. <div class="feed-item-body">
  34. <?php print $content; ?>
  35. </div>
  36. <?php endif; ?>
  37. <?php if ($categories): ?>
  38. <div class="feed-item-categories">
  39. <?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
  40. </div>
  41. <?php endif ;?>
  42. </div>

Related topics