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

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

This example Drupal source code file (webform-submission-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

array, class, div, else, endif, if, next, php, previous, webform-submission-navigation

The webform-submission-navigation.tpl.php Drupal example source code


 * @file
 * Customize the navigation shown when editing or viewing submissions.
 * Available variables:
 * - $node: The node object for this webform.
 * - $submission: The contents of the webform submission.
 * - $previous: The previous submission ID.
 * - $next: The next submission ID.
 * - $previous_url: The URL of the previous submission.
 * - $next_url: The URL of the next submission.
 * - $mode: Either "form" or "display". As the navigation is shown in both uses.
<div class="webform-submission-navigation">
  <?php if ($previous): ?>
    <?php print l(t('Previous submission'), $previous_url, array('attributes' => array('class' => array('webform-submission-previous')), 'query' => ($mode == 'form' ? array('destination' => $previous_url) : NULL))); ?>
  <?php else: ?>
    <span class="webform-submission-previous"><?php print t('Previous submission'); ?></span>
  <?php endif; ?>

  <?php if ($next): ?>
    <?php print l(t('Next submission'), $next_url, array('attributes' => array('class' => array('webform-submission-next')), 'query' => ($mode == 'form' ? array('destination' => $next_url) : NULL))); ?>
  <?php else: ?>
    <span class="webform-submission-next"><?php print t('Next submission'); ?></span>
  <?php endif; ?>

Other Drupal examples (source code examples)

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