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:
$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?

Comments

  • Foot is not a valid Vanilla control. If you look in appg/init_vanilla.php you can see that the Footer is actually a Filler 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.
  • Thank you, I'll look into that!
Sign In or Register to comment.