Post by rzaprianov » Thu May 31, 2018 5:29 pm

I saw there is a module that install "Home" button for "default" theme, but I use oc-light theme. So I went to the code /catalog/view/theme/oc-light/template/common and I try to put the

Code: Select all

<li><a href="<?php echo $home; ?>">Home</a></li>
there just below

Code: Select all

 <ul class="list-unstyled">
in file "menu.twig", but there is no any effect. What's wrong?





Fri Feb 23, 2018 5:16 pm

Post by sw!tch » Fri Jun 01, 2018 2:54 am

Well its MVC you need to declare the home variable in the controller further if using 3.x you are using the wrong syntax in the twig file.


(e.g above $data['categories'] = array();

Code: Select all

$data['home'] = $this->url->link('common/home');
and then in your menu.twig template you need to use twig syntax.

Code: Select all

<li><a href="{{ home }}">Home</a></li>
Flush all caches and then try it, backup first try at your own risk. You should really create an OCMOD to do this and not edit core files.

Active Member


Sat Apr 28, 2012 2:32 pm
Who is online

Users browsing this forum: No registered users and 4 guests