xtemplate_block

Versions
4.6
xtemplate_block(&$block)

Code

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

<?php
function xtemplate_block(&$block) {
  global $xtemplate;

  // create template variables for all block variables (module, delta, region, subject, content, ...)
  foreach ($block as $key => $value) {
    $xtemplate->template->assign($key == "subject" ? "title" : $key, $value); // TODO: standardize on 'title' (ie. rename all $block["subject"] to "title")
  }
  $xtemplate->template->parse("block");
  $output = $xtemplate->template->text("block");
  $xtemplate->template->reset("block");
  return $output;
}
?>
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.