Post by alexdog1805 » Sat Jun 18, 2011 11:12 pm

I want to add a page from information column too header menu.

What should I do?

Active Member

Posts

Joined
Sat May 28, 2011 1:51 am

Post by SXGuy » Sun Jun 19, 2011 12:35 am

edit catalog/view/theme/yourtheme/template/common/header.tpl

find menu div

add after the first <ul>
<li><a href="yoursite.com/yourpage">Page Name</a></li>

Active Member

Posts

Joined
Sun Nov 08, 2009 2:07 am

Post by dee-efx » Mon Jul 18, 2011 5:08 am

Hi, I have followed the steps above and they worked brilliant. The only thing is you will have to change the width in style.css otherwise the links will not fit in. I changed by to 900px and it works great.

I still need help with this though
I was wondering if anyone knew how to change toe colour of the menu item if it is selected, It works okay for the default items like home login etc etc but I cant get it to work for Events and Work shops. Can anyone help. Code from header.tpl below

<div class="div5">
<div class="left"></div>
<div class="div4"><a href="<?php echo str_replace('&', '&', $home); ?>" id="tab_home"><?php echo $text_home; ?></a>
<?php if (!$logged) { ?>
<a href="<?php echo str_replace('&', '&', $login); ?>" id="tab_login"><?php echo $text_login; ?></a>
<?php } else { ?>
<a href="<?php echo str_replace('&', '&', $logout); ?>" id="tab_logout"><?php echo $text_logout; ?></a>
<?php } ?>
<a href="<?php echo str_replace('&', '&', $account); ?>" id="tab_account"><?php echo $text_account; ?></a><a href="<?php echo str_replace('&', '&', $cart); ?>" id="tab_cart"><?php echo $text_cart; ?></a><a href="<?php echo str_replace('&', '&', $checkout); ?>" id="tab_checkout"><?php echo $text_checkout; ?></a>
<a href="http://MYSTORE/store/index.php?route=in ... >Events</a>
<a href="http://MYSTORE/store/index.php?route=in ... id=7">Work Shops</a></div>





Darren

New member

Posts

Joined
Wed Jul 06, 2011 2:10 am

Post by Maansy » Mon Jul 18, 2011 8:22 am

copying this code from v.1.4.8b:

Code: Select all


<script type="text/javascript"><!-- 

$(document).ready(function() {
	route = getURLVar('route');
	
	if (!route) {
		$('#tab_home').addClass('selected');
	} else {
		part = route.split('/');
		
		if (route == 'common/home') {
			$('#tab_home').addClass('selected');
		} else if (route == 'account/login') {
			$('#tab_login').addClass('selected');	
		} else if (part[0] == 'account') {
			$('#tab_account').addClass('selected');
		} else if (route == 'checkout/cart') {
			$('#tab_cart').addClass('selected');
		} else if (part[0] == 'checkout') {
			$('#tab_checkout').addClass('selected');
		} else {
			$('#tab_home').addClass('selected');
		}
	}
});
//--></script>


ALL Templates :: 1.5.1+ Templates :: 50%-75% PRICE DROP ONLY at OpencartStuff.com


User avatar
Active Member

Posts

Joined
Thu Jun 24, 2010 6:04 am


Post by StormDesigner » Fri Oct 19, 2018 9:49 pm

I found this old thread from 2011 in 2018 and we're on 3.0.2.0, It might be great if OC can get a "Top Menu" check box for info pages but I found my simple and I think effective workaround.
I'm creating Empty Categories, Selecting "Top Menu" & treating them as Information pages. Done.
Any questions?
One issue that is obvious with this approach is that you need to be able to tolerate having these categories appear in the sidebar menu with (0) product counts. Hmm, guess it's not perfect. I need to find a twig to edit or does anyone know of a plug-in that might provide better top menu control?

StormDesigns, Inc. Website Design and Web Application Development - plus graphic design and print media.

www.StormDesigns.com


User avatar
New member

Posts

Joined
Wed Feb 01, 2012 1:53 am


Post by StormDesigner » Sat Oct 20, 2018 2:30 am

I figured it out for Version 3.x (10/2018) in Admin, Design > Theme Editor > Common > menu.twig - Add items to link to in standard HTML JUST BEFORE the closing </UL> tag at the bottom of the default (and very brief) file. Worked like a charm, easy to get to.

StormDesigns, Inc. Website Design and Web Application Development - plus graphic design and print media.

www.StormDesigns.com


User avatar
New member

Posts

Joined
Wed Feb 01, 2012 1:53 am


Post by johnp » Wed Nov 14, 2018 3:36 am


Opencart 1.5.6.5/Default Theme/VQMOD 2.6.1 lover, user and geek.
Opencart Installs, Fixing, Development Upgrades, Ecommerce, Marketing and More
https://aawadmin.co.uk/ecommerce-and-website-services
https://aawadmin.co.uk


Active Member

Posts

Joined
Fri Mar 25, 2011 10:25 am
Location - Surrey, UK
Who is online

Users browsing this forum: No registered users and 6 guests