I want to get a specific information page(s) so i can get it displayed where i want instead of having all the infrmation pages.
See below example, based on opencart 1.54
viewtopic.php?t=30529
However as of opencart 3.0 you are not allowed to use php in the twig file. So i have a little bit trouble adjusting the example for opencart 1.54 to oc 3.0
I have been doing some coding. And although i get something i am not there yet
So i have added this piece of code as a test in the controller/common/footer.php
Code: Select all
if ( $informations['information_id'] = '3' ) {
$data['privacy'][] = array(
'title' => $result['title'],
'information_id' => $result['information_id'],
'href' => $this->url->link('information/information', 'information_id=' . $result['information_id'])
);
}
if ( $informations['information_id'] = '5' ) {
$data['term'][] = array(
'title' => $result['title'],
'information_id' => $result['information_id'],
'href' => $this->url->link('information/information', 'information_id=' . $result['information_id'])
);
}
Code: Select all
foreach ($this->model_catalog_information->getInformations() as $result) {
if ($result['bottom']) {
$data['informations'][] = array(
'title' => $result['title'],
'information_id' => $result['information_id'],
'href' => $this->url->link('information/information', 'information_id=' . $result['information_id'])
);
}
}
I have added
Code: Select all
{% for privacys in privacy %}
<a href="{{ privacys.href }}">{{ privacys.title }}yo</a>
{% endfor %}
{% for terms in term %}
<a href="{{ terms.href }}">{{ terms.title }}tse</a>
{% endfor %}
Any help is very much appreciated.
Thanks