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

Drupal example source code file (calendar-main.tpl.php)

This example Drupal source code file (calendar-main.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

array, attributes, calendar-calendar, calendar_links, class, div, inline, links, php

The calendar-main.tpl.php Drupal example source code

<?php
// $Id: calendar-main.tpl.php,v 1.8 2010/12/21 13:41:24 karens Exp $
/**
 * @file
 * Template to display calendar navigation and links.
 * 
 * @see template_preprocess_calendar_main.
 *
 * $view: The view.
 * $calendar_links: Array of formatted links to other calendar displays - year, month, week, day.
 * $calendar_popup: The popup calendar date selector.
 * $display_type: year, month, day, or week.
 * $mini: Whether this is a mini view.
 * $min_date_formatted: The minimum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
 * $max_date_formatted: The maximum date for this calendar in the format YYYY-MM-DD HH:MM:SS.
 * 
 */
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
$links = array(
  'links' => $calendar_links, 
  'attributes' => array('class' => 'inline'),
);
?>

<div class="calendar-calendar">
  <?php if (!empty($calendar_popup)) print $calendar_popup;?>
  <?php if (!empty($calendar_add_date)) print $calendar_add_date; ?>
  <?php if (empty($block)) print theme('links', $links);?>
  <?php print theme('date_navigation', array('view' => $view)) ?>
</div>

Other Drupal examples (source code examples)

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