OK, this works for me: I have a plugin using hook process_templates_complete with this code (should be same as posted above):
Code:
$templater = vB_Template::create('CVR4_searchprofile');
$templater->register('notifications_menubits', $notifications_menubits);
$CVR4_searchprofile = $templater->render();
// but use preRegister() here because you won't have a chance to call
// register() for the navbar template
vB_Template::preRegister('navbar', array('CVR4_searchprofile' => $CVR4_searchprofile));
Then I created a new CVR4_searchprofile template like this:
Code:
<vb:if condition="$show[notifications]">
Show Notifications:
{vb:raw notifications_menubits}
<vb:else />
Don't Show Notifications
</vb:if>
and then I put {vb:raw CVR4_searchprofile} in my navbar template. And it looks like this:
Attachment 136887