title: Enlight_Controller_Action_PreDispatch_Frontend is not working in Plugin.php class
body: <p>I am creating a shopware 5 plugin. I want to display something after the categories on every page.
  I am using this code to do my task as suggested in this <a href="https://academy.shopware.com/courses/take/developer-training-basic-english/lessons/4536444-4-2-subscriber-method-global-events" rel="nofollow noreferrer">video</a>, but the event is not getting recognized.</p>
  
  <p>Here is my code</p>
  
  <pre><code>&lt;?php
  namespace MyPlugin;
  
  use Shopware\Components\Plugin;
  
  class MyPlugin extends Plugin{
      public static function getSubscribedEvents()
      {
          return [
              'Enlight_Controller_Action_PreDispatch_Frontend' =&gt; 'onPreDispatch'
          ];
      }
  
      public function onPreDispatch(\Enlight_Event_EventArgs $args)
      {
          $controller = $args-&gt;getSubject();
          $view = $controller-&gt;View();
  
          $view-&gt;addTemplateDir(__DIR__.'/Resources/views');
      }
  }
  </code></pre>
  
  <p><strong>frontend/index/index.tpl</strong></p>
  
  <pre><code>{extends file="parent:frontend/index/index.tpl"}
  {block name="frontend_index_navigation_categories_top" append}
      &lt;div&gt;my items here&lt;/div&gt;
  {/block}
  </code></pre>
  
  <p>Any help would be much appreciated.</p>