Jump to content

Basilico Agency

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Basilico Agency

  • Rank
    Newbie

Contact Methods

  • Website URL
    https://www.basili.co

Profile Information

  • Location
    Italy

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I'm trying to attach the hook initTwig into the template (_init.php), but it doesn't work. wire()->addHookAfter("TemplateEngineTwig::initTwig", function(HookEvent $event) { $twig = $event->arguments('twig'); // Extend $twig with custom code }); By now, I'm able to hook it correctly only by hooking within a class (for example a class defined in a module), but sometimes it's useful to extend it directly from a template without the hassle of dealing with a module. Anyone experiencing the same issue? Thanks!
×
×
  • Create New...