Post by oliwin » Sat Oct 28, 2017 5:58 am

I tried to modify home controller adding new variable:

Code: Select all

$data["header_home"] = true;
Then I try to check this in header.twig tetmplate like as:

Code: Select all

{% if header_home %}
    {% else %}
<div>Not Home</div>
{% endif %}
When I open home page by index.php or just url address it does not work, I mean I dont see `<div>Home</div>`.

How to fix it, what do wrong?

New member


Tue Jan 10, 2017 2:00 am

Post by yodapt » Sun Oct 29, 2017 9:41 pm

Clear cache in admin. If it still doesnt work, change the template inside admin instead of altering the actual file, if you did so before.

Opencart Developer - My Extension Showcase
Contact me at

User avatar
Active Member


Fri Jun 17, 2011 6:39 pm

Who is online

Users browsing this forum: No registered users and 16 guests