HomeBreadcrumb ArrowThemesBreadcrumb ArrowOpenCart ThemesBreadcrumb ArrowGadgeteric Premium R...Breadcrumb ArrowHyperlinks on menu bar
Thread Solved

Hyperlinks on menu bar

This discussion has been marked as solved
User Image
kevin herring member
#1 posted on 20/2/14

Is there anyway of adding a link to another page, lets say your contacts page onto the main menu bar where all the categories are?

0
User Image
Nikola Hristov member
#2 posted on 21/2/14

Hello Kevin,

Thank you for reaching us.

In order to add links, other than the OpenCart categories, you will have to modify the /catalog/view/theme/gadgeteric/template/common/header.tpl file.

Locate this line of code:

<?php foreach ($categories as $k => $category) { ?>

and insert the following snippet before it:

<li><a href="YOUR_LINK_HERE">YOUR_LINK_TEXT_HERE</a></li>

Replace the text and link with your desired ones and you are set for the desktop version.

In order to also show the link in the mobile menu locate this line:

<?php foreach ($categories as $category) { ?>

and insert the following snippet before it:

<option value="YOUR_LINK_HERE">YOUR_LINK_TEXT_HERE</option>

Please note that the examples given above will insert the link before all other links in the menu. The loop of the links cannot be modified easily from the front-end theme-specific files. If you would like to insert links in the middle, you can modify the /catalog/controller/common/header.php controller with vQmod, however, this is a more advanced approach and should be consulted with a developer.

Hope this helps. Should you have further questions or comments, please do not hesitate to reach us via our Ticket Support system.

0