So your route would be 'information/contact'
Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz
Ok, this could work maybe... but how to add it to theme editor on backend, in this way?d3z1gnr wrote: ↑Sat Oct 19, 2019 3:35 amThis might be what you looking for viewtopic.php?t=171486#p650375
So your route would be 'information/contact'
Code: Select all
{% if route == 'xxx/yyy' %}
My code here
{% endif %}
Ah, so you do not have access to controller code?magisterson wrote: ↑Sat Oct 19, 2019 3:47 amOk, this could work maybe... but how to add it to theme editor on backend, in this way?
Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz
Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz
If you have extensions installed and using theme editor (?) this could get messy as they suggest.
Sorry, I'm not helping much.
Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz
Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz
Code: Select all
$data['route'] = isset($this->request->get['route']) ? $this->request->get['route'] : 'common/home';
Code: Select all
if ($route == 'xxx/yyy') {
My code here
}
Code: Select all
{% if route == 'information/contact' %}
My code here
{% endif %}
Mike Little
Director / Developer / Makes the coffee
Creative Digital Limited
http://www.creativedigital.co.nz
This works good.d3z1gnr wrote: ↑Sat Oct 19, 2019 4:31 amYou had it right earlier...
Code: Select all
{% if route == 'information/contact' %} My code here {% endif %}
I asking because I used this tool: https://php2twig.com/index.php and it showed me this:
Code: Select all
{% if route is 'information/contact' %}
my code
{% endif %}
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Users browsing this forum: daniil_oc, pprmkr, WaxedPerfection and 470 guests