Page 1 of 1

Display Link To About Us on Top Navigation Bar?

Posted: Mon Dec 18, 2017 3:50 am
by DIHI
Hello

How can I display a link to our about us page on the top navigation bar?

Thanks in advance :)

Re: Display Link To About Us on Top Navigation Bar?

Posted: Mon Dec 18, 2017 4:04 am
by straightlight
No OC version posted. In catalog/controller/common/header.php file,

find:

Code: Select all

// Wishlist
add above:

Code: Select all

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

		$data['informations'] = array();

		foreach ($this->model_catalog_information->getInformations() as $result) {
			if ((int)$result['information_id'] == X) {
				$data['informations'][] = array(
					'title' => $result['title'],
					'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
				);
			}
		}
		
Note: Replace the X in the condition with your actual information ID where it leads to the About Us page.

Then, in your catalog/view/theme/<your_theme>/common/header.twig file,

use the informations array where you want:

Code: Select all

{{ informations }}
To create the loop. Follow the example from footer.tpl file.

Re: Display Link To About Us on Top Navigation Bar?

Posted: Mon Dec 18, 2017 4:10 am
by DIHI
Thank you Straightlight I shall have a play this evening and see if I can make it work :)