I
I
Ilya Filonov2020-05-13 16:05:55
opencart
Ilya Filonov, 2020-05-13 16:05:55

How to copy menu and search bar in opencart from one page to another?

Good afternoon. There is a search bar and a menu bar. By default, they were in the header of the site. I transferred them to the body home.twig. Now I'm editing the categories page. In the code just indicated

{{ search }}
{{ menu }}
but they didn't show up on the page. Tell me how to port them there?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lazuren, 2020-05-13
@gbreadman13

You need to controller catalog/controller/common/home.php before

$this->response->setOutput($this->load->view('common/home', $data));
paste this code here:
$data['search'] = $this->load->controller('common/search');
$data['menu'] = $this->load->controller('common/menu');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question