title: Prestashop - How to display an existing module to a new hook?
body: <p>Ive created a new hook and I want to add an existing module (blocktopmenu) to that hook.</p>
  
  <p>The hook's name is: topMenu</p>
  
  <p>Ive added this to blocktopmenu.php:</p>
  
  <pre><code>public function hookTopMenu($param)
    {
      global $smarty;
        $this-&gt;makeMenu();
        $smarty-&gt;assign('MENU_SEARCH', Configuration::get('MOD_BLOCKTOPMENU_SEARCH'));
        $smarty-&gt;assign('MENU', $this-&gt;_menu);
        $smarty-&gt;assign('this_path', $this-&gt;_path);
        return $this-&gt;display(__FILE__, 'blocktopmenu.tpl');
    }
  </code></pre>
  
  <ul>
  <li><p>Ive added the module to the new hook in Modules --> Position.</p></li>
  <li><p>Then Ive added this to override/classes/FrontController.php:</p>
  
  <p>function displayHeader(){
              parent::displayHeader();</p>
  
  <pre><code>        self::$smarty-&gt;assign(array(
              'HOOK_HEADER' =&gt; Module::hookExec('header'),
              'HOOK_TOP' =&gt; Module::hookExec('top'),
              'HOOK_TOP_MENU' =&gt; Module::hookExec('topMenu'),
              'HOOK_LEFT_COLUMN' =&gt; Module::hookExec('leftColumn')
          ));
      }
  </code></pre></li>
  </ul>
  
  <p>Finally in themes/mytheme/header.tpl I have:</p>
  
  <pre><code>&lt;div class="my_top_menu"&gt;{$HOOK_TOP_MENU}&lt;/div&gt;
  </code></pre>
  
  <p>But nothing happens... the output is:</p>
  
  <pre><code>&lt;div class="my_top_menu"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Any idea how to get it ?</p>
  
  <p>Thanks!</p>