Show/hide a block depending on its position

Price: free
To download this free product, you do not need to order it, just log in.
A small addition allows you to use conditions in theme or module template files to show or hide blocks based on its position. Show or hide blocks based on their position in layouts.
For example:

{% if position == 'column_left' or position == 'column_right' %}
Show a block if it is in the left or right column
{% else %}
Show a block if it is not in the right or left column
{% endif %}
Attention! Some templates may use similar modifications. Before using a modifier, make sure you really need it.
Verified forversions Opencart 3.0.4.0, OcStore 3.0.2.0, OcStore 3.0.3.7, OcStore 3.0.3.9
Uploaded:
13.04.2025
Updated:
15.04.2025
Viewed:
2190

Write a review

Your Name:


Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:






Yet, no one has left a comment to the entry.
Leave a comment text_write_hint