home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (aggregator-item.tpl.php)

This example Drupal source code file (aggregator-item.tpl.php) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

class, content, div, endif, feed-item-body, feed-item-categories, feed-item-meta, feed-item-title, h3, php, source_url

The aggregator-item.tpl.php Drupal example source code

// $Id: aggregator-item.tpl.php,v 1.2 2008/05/15 21:27:32 dries Exp $

 * @file
 * 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 template_preprocess()
 * @see template_preprocess_aggregator_item()
<div class="feed-item">
  <h3 class="feed-item-title">
    <a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a>

  <div class="feed-item-meta">
  <?php if ($source_url) : ?>
    <a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> -
  <?php endif; ?>
    <span class="feed-item-date"><?php print $source_date; ?></span>

<?php if ($content) : ?>
  <div class="feed-item-body">
    <?php print $content; ?>
<?php endif; ?>

<?php if ($categories) : ?>
  <div class="feed-item-categories">
    <?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?>
<?php endif ;?>


Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal aggregator-item.tpl.php source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.