Page 1 of 1

adding information links to footer

Posted: Thu Jun 25, 2009 2:51 pm
by aquamarine
I would like to move the links of the Information Module to the footer. What would be the cleanest way to solve this? It seems odd to put the information module on the side like that. Those links seem more appropriate in the footer. Hopefully it will populate through out the site that way. Unfortunately it's not an option to have it moved to the bottom through the admin.

If someone can answer as soon as possible, I would be really cool.

Thanks:-)

Re: adding information links to footer

Posted: Sat Jun 27, 2009 3:57 am
by crt-inc
Simple HTML code, create a menu option in HTML with the same links and edit the footer.pl in the template folder

Re: adding information links to footer

Posted: Sun Jun 28, 2009 2:55 pm
by readyman
Open catalog/controller/module/information.php and get this code

Code: Select all

		$this->load->model('catalog/information');

		$this->data['informations'] = array();

		foreach ($this->model_catalog_information->getInformations() as $result) {
      		$this->data['informations'][] = array(
        		'title' => $result['title'],
	    		'href'  => $this->model_tool_seo_url->rewrite($this->url->http('information/information&information_id=' . $result['information_id']))
      		);
Put it in the catalog/controller/common/footer.php file inside the index function.

Then copy the code for the template files from catalog/view/theme/default/template/module/information.tpl to catalog/view/theme/default/template/common/footer.tpl

ie. copy

Code: Select all

    <ul>
      <?php foreach ($informations as $information) { ?>
      <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
      <?php } ?>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
    </ul>
After this you may safely turn off the information module in the administration section and then you can use CSS to make the new list into a set of links in your footer.

Re: adding information links to footer

Posted: Mon May 28, 2012 9:04 am
by beattie
You can also add links to the footer. Here's a VQMod extension to add signup and login links to the footer if the user is not logged in: http://www.opencart.com/index.php?route ... me=beattie