opencart 1.5 how to add module in a header

后端 未结 8 1523
不思量自难忘°
不思量自难忘° 2021-02-14 21:58

Please some one tell me how can I position modules like slider or banner in header or how can we define additional regions for the modules.

8条回答
  •  鱼传尺愫
    2021-02-14 22:55

    You must know that your new position is a new child.

    file: catalog/controller/common/header.php
    
    $this->children = array(
    'module/language',
    'module/currency',
    'module/cart'
    );
    

    add your new position, like this:

    $this->children = array(
    'common/content_new',
    'module/language',
    'module/currency',
    'module/cart'
    );
    

    now you can echo your new position in your header.tpl

提交回复
热议问题