/** * Load block content * @param string $block Block name - the real block is tpls/blocks/[block].php * @param array $vars information of block (used in template layout) * * @return string Block content */ function loadBlock($block, $vars = array()) { $path = T3Path::getPath('tpls/blocks/' . $block . '.php'); if ($path) { if ($block == 'footer') { ob_start(); include $path; $buffer = ob_get_contents(); ob_end_clean(); $buffer = T3::fixT3Link($buffer); echo $buffer; } else { include $path; } } else { echo "<div class=\"error\">Block [{$block}] not found!</div>"; } }