Zikula_Template_Plugins
[ class tree: Zikula_Template_Plugins ] [ index: Zikula_Template_Plugins ] [ all elements ]

Source for file function.add_additional_header.php

Documentation is available at function.add_additional_header.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright (c) 2004, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: function.add_additional_header.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @package Zikula_Template_Plugins
  10.  * @subpackage Functions
  11.  */
  12.  
  13. /**
  14.  * Smarty function to add additional information to the <head> </head>
  15.  * section of a Zikula document
  16.  *
  17.  * Available parameters:
  18.  *   - header:   If set, the value is assigned to the global
  19.  *               $additional_header array.  The value can be a single
  20.  *               string or an array of strings.
  21.  *
  22.  * Example
  23.  *   <!--[add_additional_header header='<title>This is the title</title>']-->
  24.  *  OR
  25.  *   <!--[add_additional_header header=$title]-->
  26.  *
  27.  * @author       Chris Miller
  28.  * @since        14 August 2004
  29.  * @param        array       $params      All attributes passed to this function from the template
  30.  * @param        object      &$smarty     Reference to the Smarty object
  31.  * @return       string      the value of the last status message posted, or void if no status message exists
  32.  */
  33. function smarty_function_add_additional_header($args&$smarty)
  34. {
  35.     if (!isset($args['header'])) {
  36.         return;
  37.     }
  38.  
  39.     global $additional_header;
  40.  
  41.     if (is_array($args['header'])) {
  42.         foreach($args['header'as $header{
  43.             $additional_header[$header;
  44.       }
  45.     else {
  46.         $additional_header[$args['header'];
  47.     }
  48.  
  49.     return;
  50. }

Documentation generated on Fri, 18 Jul 2008 21:45:06 +0200 by phpDocumentor 1.4.1