Hi all
I would like to use the information list in the main layout.
would do I go about doing this.
I have experience with php but not cake do I need to create a new controler
any help with this would be great thanks.
mac
thanks for the reply Qphoria
sorry but the vague question.
I have realised that its is not the layout template file that I need to display the information
links but the head template.
this there a why to load the information model into the header controler so I can accesss the
informtion link from the database.
thanks again
Mac
sorry but the vague question.
I have realised that its is not the layout template file that I need to display the information
links but the head template.
this there a why to load the information model into the header controler so I can accesss the
informtion link from the database.
thanks again
Mac

sorted it
just in case anyone else wants to do something similar
you will need to add the information module to the header.php file in
catalog/controller/common/header.php
here is the code
you will also have to get the information results from the database
now in the header.tpl file in
catolog/view/theme/default/template/common/
hope this will save someone a bit time 
just in case anyone else wants to do something similar
you will need to add the information module to the header.php file in
catalog/controller/common/header.php
here is the code
Code: Select all
$this->load->model('catalog/information');
Code: Select all
foreach ($this->model_catalog_information->getInformations() as $result) {
$this->data['info_links'][] = array(
'title' => $result['title'],
'href' => $this->model_tool_seo_url->rewrite($this->url->http('information/information&information_id=' . $result['information_id']))
);
}
now in the header.tpl file in
catolog/view/theme/default/template/common/
Code: Select all
<ul>
<?php foreach ($info_links as $information) { ?>
<li><a href="<?php echo $information['href']; ?>"><?php echo $information['title'];?></a></li>
<?php } ?>
</ul>

Who is online
Users browsing this forum: No registered users and 7 guests