Jump to content

Basilico

Members
  • Posts

    8
  • Joined

  • Last visited

About Basilico

  • Birthday 11/21/2010

Contact Methods

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

Profile Information

  • Location
    Italy

Recent Profile Visitors

843 profile views

Basilico's Achievements

Newbie

Newbie (2/6)

0

Reputation

  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...