Quote:
Originally Posted by winstone
what does following function do?
PHP Code:
$templater->register_page_templates();
|
It makes the
header,
footer and
headinclude templates available to the template being evaluated.
Quote:
Originally Posted by winstone
can we include other templates inside it? e.g. $templater->register_page_templates('top_bit', 'side_bit', 'etc');
|
No. But you can do that via the register() method.
For example: [untested]
PHP Code:
$templater = vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('my_sidebar_1', vB_Template::create('sidebar_1')->render());
print_output($templater->render());
This would make the sidebar_1 template accessible via
{vb:raw my_sidebar_1}
in your main TEST template.