Thanks a lot Shadab, it works the way you coded
however there is one little problem, if I register a variable in the code which is used in 'sidebar_1' template, I can't get it to show in the output using {vb:raw VariableInMySideBar} method
this is the code:
PHP Code:
##The variable to be used in 'my_sidebar_1' template
$ExVariable= 'SomeAutoGeneratedContent';
$templater = vB_Template::create('TEST');
$templater->register_page_templates();
$templater->register('navbar', $navbar);
$templater->register('my_sidebar_1', vB_Template::create('sidebar_1')->render());
##Register the variable
$templater->register('VariableInMySideBar', $ExVariable);
print_output($templater->render());
in the template 'TEST',
Code:
{vb:raw my_sidebar_1}
works fine
in 'sidebar_1' template:
Code:
{vb:raw VariableInMySideBar}
doesn't work
and surprisingly
works fine, but I guess I shouldn't use it like that