Post by uwe_kwigx » Fri Aug 28, 2015 5:27 pm

Hello,
i recently installed OpenCart and managed to modify an extension which added a "Home" Button to the Top Menu Bar. I now could just modify this with several Link titles which i wanted to put in the top menu and just install it as an extension in OpenCart.

But there must be an easier way. The header.tpl code in catalog/view/theme/default/template/common is really long and i couldnt managed to put a simple code inside so it appeared in the right way on the top menu bar. After which line can i add my links?

This is the modification which i use to add Links to the top menu bar.

Code: Select all

    <file path="catalog/view/theme/*/template/common/header.tpl">
		<operation>
			<search ><![CDATA[<ul class="nav navbar-nav">]]></search>
			<add position="after"><![CDATA[<li><a href=" MY LINK "> LINK TITLE </a></li>]]></add>
		</operation>
	</file>

Newbie

Posts

Joined
Fri Aug 28, 2015 5:22 pm

Post by viethemes » Sat Aug 29, 2015 1:00 am

I see that your code will add a link befire the first menu item in Top Menu :)

http://www.viethemes.com - OpenCart turtorials, news, tips and stricks, extension

Our extensions:
Visual Theme Editor - Powerful tool for customizing style of any theme visually
Live Theme Editor - Customize layout, colors, backgrounds, fonts of the default theme
Theme Animation - Animation Editor for any theme

Extra Positions PRO, Custom JavaScript, Custom CSS and others


User avatar
Active Member

Posts

Joined
Thu Jan 08, 2015 12:17 pm


Post by uwe_kwigx » Mon Aug 31, 2015 4:35 pm

viethemes wrote:I see that your code will add a link befire the first menu item in Top Menu :)
Exactly, but where can i place this lines in header.tpl to add links without this extension?

Newbie

Posts

Joined
Fri Aug 28, 2015 5:22 pm

Post by OSWorX » Mon Aug 31, 2015 5:00 pm

There are many extensions (paid and free) which will add links you want:
https://www.opencart.com/index.php?rout ... der%20menu

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by Venkko » Mon Aug 31, 2015 7:48 pm

HI!

If I have undestand your question correctly, you have your answer on your modification code.
Exactly, but where can i place this lines in header.tpl to add links without this extension?

Code: Select all

<search ><![CDATA[<ul class="nav navbar-nav">]]></search>
         <add position="after"><![CDATA[<li><a href=" MY LINK "> LINK TITLE </a></li>]]></add>
On the code above it says that search "ul class="nav navbar-nav" and add after that line "<li><a href=" MY LINK "> LINK TITLE </a></li>"

Isn't this the one that you where asking?

http://www.pikkukoala.fi


Active Member

Posts

Joined
Mon Mar 05, 2012 8:32 pm

Post by uwe_kwigx » Thu Sep 03, 2015 4:02 pm

OSWorX wrote:There are many extensions (paid and free) which will add links you want:
https://www.opencart.com/index.php?rout ... der%20menu
This is what i searched - thank you!

Custome opencart header menu free

Newbie

Posts

Joined
Fri Aug 28, 2015 5:22 pm

Post by InfiniteDezigns » Thu Oct 22, 2015 6:31 am

Found exactly where this was supposed to go. Unfortunately it no longer works in Opencast 2.0.3.1. What happened?

New member

Posts

Joined
Mon Jun 21, 2010 5:18 am
Who is online

Users browsing this forum: No registered users and 114 guests