Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Add to a delegate of Foot
I am working on an extension for breadcrumbs.
The strange thing is that they render when I add them to a delegate of Menu as:
but that nothing shows when I add them to delegate of Foot as:
Does anyone knows why?
The strange thing is that they render when I add them to a delegate of Menu as:
$Context->AddToDelegate('Menu',
'PreBodyRender',
'RenderBreadcrumbs);
but that nothing shows when I add them to delegate of Foot as:
$Context->AddToDelegate('Foot',
'PreFootRender',
'RenderBreadcrumbs);
Does anyone knows why?
0
Comments
Foot
is not a valid Vanilla control. If you look inappg/init_vanilla.php
you can see that the Footer is actually aFiller
control. You would need to make it like this:<?php $Context->AddToDelegate('Filler', 'PreRender', 'RenderBreadCrumbs_Foot'); function RenderBreadCrumbs_Foot(&$Filler) { if ($Filler->TemplateFile !== 'foot.php') return; // Rest of your code goes here }
Since the
Filler
control can use any template file and render it, you need to test that you're in the right template file.