xtemplate_init

Versions
4.6
xtemplate_init($template)

Code

themes/engines/xtemplate/xtemplate.engine, line 9

<?php
function xtemplate_init($template) {
  // We cannot use the theme() or path_to_theme() functions here
  if (!class_exists('XTemplate')) {
    include_once(dirname(__FILE__) . '/xtemplate.inc');
  }
  $GLOBALS["xtemplate"] = new StdClass();
  $dir = dirname($template->filename);
  $GLOBALS['xtemplate']->template = new XTemplate(basename($template->filename), $dir);
  $GLOBALS['xtemplate']->template->assign(array('directory' => $dir));
  $GLOBALS['xtemplate']->template->SetNullBlock(' ');  // '' doesn't work!
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.