I was used below condition of Custom Box Content Display Only for HomePage in OpenCart 1.5.6. & this is working fine.
I was used this in header.tpl file.
<?php if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home') {?>
/////////////////////////
/ /
/ /
/ /
/ Box Content /
/ /
/ /
/ /
/ /
/////////////////////////
<?php } ?>
but, this is not working in OpenCart 2.0.
How can the same thing be achieved in Opencart 2.0?
echo $this->request->get['route']and check for this printed value? - Aleksei Matiushkin$thisand the objects from registry. To access them You'd need to add$this->request->get['route']to the array$datain controller and then use it in your template... I.e.$data['route'] = $this->request->get['route'];and then in template<?php if ($route == 'common/home') { ?>. - shadyyx