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

Drupal example source code file (date-navigation.tpl.php)

This example Drupal source code file (date-navigation.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, clear-block, date-heading, date-next, date-prev, div, empty, endif, nbsp, next_url, php, prev_url

The date-navigation.tpl.php Drupal example source code

// $Id: date-navigation.tpl.php,v 2009/04/30 10:44:43 karens Exp $
 * @file
 * Template to display date navigation links.
 * $nav_title
 *   The formatted title for this view. In the case of block
 *   views, it will be a link to the full view, otherwise it will 
 *   be the formatted name of the year, month, day, or week.
 * $prev_url
 * $next_url
 *   Urls for the previous and next calendar pages. The links are 
 *   composed in the template to make it easier to change the text,
 *   add images, etc.
 * $prev_options
 * $next_options
 *   Query strings and other options for the links that need to
 *   be used in the l() function, including rel=nofollow.
 * $block: 
 *   Whether or not this view is in a block.
 * $view
 *   The view object for this navigation.
 * The   in the prev and next divs is to be sure they are never
 * completely empty, needed in some browsers to prop the header open
 * so the title stays centered.
<div class="date-nav clear-block">
  <div class="date-prev">
    <?php if (!empty($prev_url)) : ?>
      <span class="next"> <?php print l('« ' . ($block ? '' : date_t('Prev', 'date_nav')), $prev_url, $prev_options); ?></span>
    <?php endif; ?>
  <div class="date-heading">
    <h3><?php print $nav_title ?></h3>
  <div class="date-next"> 
    <?php if (!empty($next_url)) : ?>
      <span class="next"> <?php print l(($block ? '' : date_t('Next', 'date_nav')) . ' »', $next_url, $next_options); ?></span>
    <?php endif; ?>  

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal date-navigation.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.