K
K
Kalwin UA2019-07-26 13:04:22
opencart
Kalwin UA, 2019-07-26 13:04:22

How to make a separate header for the entire "account" directory?

How to make a separate header for the entire "account" directory?
I know that in order to change the header for one page, let's say "login" can be used in "controller/common/header.php":

if ($this->request->get['route']==' account/login') {
            return $this->load->view('common/login_header', $data);
        } else {
            return $this->load->view('common/header', $data);
        }

Found a solution like this:
if (strpos($this->request->get['route'], 'account/' === 0)) {
...
}

But it doesn't help.
OC3

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zoozag, 2019-07-29
@zoozag

if (strpos($this->request->get['route'], 'account/') === 0) {
...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question