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

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

This example Drupal source code file (calendar-mini.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, as, cell, class, day_names, div, endforeach, foreach, php, row, table, tbody, thead, tr

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

// $Id: calendar-mini.tpl.php,v 1.7 2010/12/21 13:41:24 karens Exp $
 * @file
 * Template to display a view as a mini calendar month.
 * @see template_preprocess_calendar_mini.
 * $day_names: An array of the day of week names for the table header.
 * $rows: An array of data for each day of the week.
 * $view: The 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.
 * $show_title: If the title should be displayed. Normally false since the title is incorporated
 *   into the navigation, but sometimes needed, like in the year view of mini calendars.
//dsm('Display: '. $display_type .': '. $min_date_formatted .' to '. $max_date_formatted);
<div class="calendar-calendar"><div class="month-view">
<?php if ($view->date_info->show_title): ?>
  <?php print theme('date_navigation', array('view' => $view)); ?>
<?php endif; ?> 
<table class="mini">
      <?php foreach ($day_names as $cell): ?>
        <th class="<?php print $cell['class']; ?>">
          <?php print $cell['data']; ?>
      <?php endforeach; ?>
    <?php foreach ((array) $rows as $row): ?>
        <?php foreach ($row as $cell): ?>
          <td class="<?php print $cell['class']; ?> <?php print $cell['id']; ?>">
            <?php print $cell['data']; ?>
        <?php endforeach; ?>
    <?php endforeach; ?>

Other Drupal examples (source code examples)

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