Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Add links to top bar

Add links to top bar

Locked

Views: 4,961

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
4 Jan 2008, 6:43 AM
#1
adamson avatar

adamson

New Zenner

Join Date:
Dec 2007
Posts:
62
Plugin Contributions:
0

Add links to top bar

I have 3 pages I made using EZ-pages (FAQ,aboutus, & contactus). How do I add a link to these pages on the very top bar, the bar with home and login links?

Here is a picture of what im talking about

Thanks in advance!

4 Jan 2008, 7:36 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add links to top bar

ezpages actually has it's own top bar if you designate these to be in the header.

Reason is that the home login bar has other links that appear wern you login and when you add to cart. take a look and see. You might run out of space...

4 Jan 2008, 5:19 PM
#3
adamson avatar

adamson

New Zenner

Join Date:
Dec 2007
Posts:
62
Plugin Contributions:
0

Re: Add links to top bar

There would be enough space, any ideas on how to add links there?

5 Jan 2008, 9:39 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add links to top bar

You will have to edit a copy of tpl_header.php for your template and find this:

<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->

Move and somehow convert to a "li" as the other links there are in the navigation area that is above ezpages

<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a></li>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a></li>

Might have to have a look at tpl_ezpages_bar_header.php also

7 Feb 2008, 6:18 PM
#5
hansonian avatar

hansonian

New Zenner

Join Date:
May 2007
Location:
tampa, fl
Posts:
23
Plugin Contributions:
0

Re: Add links to top bar

i'm doing a similar thing were i'm adding two additional links next to home and login and was wondering how i align my new links to the right side of the bar and leave the login and home on the left were they are.

7 Feb 2008, 6:27 PM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add links to top bar

i'm doing a similar thing were i'm adding two additional links next to home
How are you adding them? ezpage or additional or current pages?

how i align my new links to the right side of the bar and leave the login and home on the left were they are.
A new div contained where you want these

<div id="your_new_div">
    <ul class="forward">
7 Feb 2008, 6:37 PM
#7
hansonian avatar

hansonian

New Zenner

Join Date:
May 2007
Location:
tampa, fl
Posts:
23
Plugin Contributions:
0

Re: Add links to top bar

i was entering them into the tpl_header.php contained in my template folder. should i be doing it some other way?

here's a link, http://www.pinecrestprinting.com/store/ i'm trying to move the about us and estimate request over to the right and keep the home & login on the left.

thanks in advance for any help on this.

7 Feb 2008, 6:44 PM
#8
hansonian avatar

hansonian

New Zenner

Join Date:
May 2007
Location:
tampa, fl
Posts:
23
Plugin Contributions:
0

Re: Add links to top bar

as for where the links goto, i have new pages that i created that the links direct to (i haven't actually created them yet but after lunch i probably will).

7 Feb 2008, 6:49 PM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add links to top bar

Try where you have this

<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><a href="http://www.pinecrestprinting.com/store/">Home</a></li>
    <li><a href="http://www.pinecrestprinting.com/store/index.php?main_page=login">Log In</a></li>	
	<li> <a href="http://www.pinecrestprinting.com/about_us.html">About Us</a></li>	
	<li> <a href="http://www.pinecrestprinting.com/estimate.html">Estimate Request</a></li>
</ul>
</div>

Creating a new contained div something like this and provide your name for the div blue is new

<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><a href="http://www.pinecrestprinting.com/store/">Home</a></li>
    <li><a href="http://www.pinecrestprinting.com/store/index.php?main_page=login">Log In</a></li>
Any other code that currently exists up to the </ul>

</ul>

<div id="your new div">
    <ul class="forward">
	<li> <a href="http://www.pinecrestprinting.com/about_us.html">About Us</a></li>	
	<li> <a href="http://www.pinecrestprinting.com/estimate.html">Estimate Request</a></li>
			
</ul>
</div>

</div>
7 Feb 2008, 6:58 PM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add links to top bar

You might create these using ezpages over a html page

25 Feb 2008, 6:37 AM
#11
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Location:
WAY out West
Posts:
86
Plugin Contributions:
0

Re: Add links to top bar

Extremely helpful Kobra, thank you!

25 Feb 2008, 7:16 AM
#12
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Location:
WAY out West
Posts:
86
Plugin Contributions:
0

Re: Add links to top bar

This worked perfectly in two carts.
http://www.200westmain.com/thefrontroom/

In the third the link had a large dot in front of it, was a weird color (not white more like purple) and slightly lower than the 'home' and 'login' links; which stretched and distorted my header.

Being nitpicky I removed it. Did this happen because I have the image behind?

Here is the header without the extra link:

http://www.200westmain.com/cart/

Is there a cure for this?

TIA

26 Feb 2008, 8:07 AM
#13
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Location:
WAY out West
Posts:
86
Plugin Contributions:
0

Re: Add links to top bar

the link had a large dot in front of it

This was bulleting caused by the 'li', delete the li and the diamond dot shaped bullets disappear.

I have discovered if you change the ul class to back instead of forward it places the new link a little to the right of the Home and Login links. When the ul class is forward the new link is on the right, where I want it.

I still do not know why the link is slightly below the Home and Login on the left, thus distorting the tile_back image behind.

28 Feb 2008, 11:08 PM
#14
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Location:
WAY out West
Posts:
86
Plugin Contributions:
0

Re: Add links to top bar

A clue? Pointer? Please pretty honey please!

28 Feb 2008, 11:27 PM
#15
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Add links to top bar

Here is the header without the extra link:

Is there a cure for this?
Where can the issue be seen?

29 Feb 2008, 5:15 AM
#16
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Location:
WAY out West
Posts:
86
Plugin Contributions:
0

Re: Add links to top bar

Well knock me down with a limp carrot!

Did you fix this long distance by giving it the snake eye? I am awed.

I pasted it back in, exactly the same code as before from my txt file, and it works!

http://www.200westmain.com/cart

All nice and white, level, and purdy!

Thank you!

16 Mar 2008, 12:04 AM
#17
aly22 avatar

aly22

Zen Follower

Join Date:
Feb 2008
Posts:
174
Plugin Contributions:
0

Re: Add links to top bar

My store is in a sub-directory and I need to include links back to the main web site into the header. Would i also edit the tpl_header.php to do this?

IE: Shop Home Log in
Main Site :: Main Site Page 1 :: Main Site Page 2 :: etc

19 Mar 2008, 3:35 PM
#18
gsdcypher avatar

gsdcypher

Totally Zenned

Join Date:
Feb 2007
Posts:
816
Plugin Contributions:
0

Re: Add links to top bar

Hey Henrietta,

What code did you use and what did you change to get your link to appear on the right side like that?

I pasted it back in, exactly the same code as before from my txt file, and it works!

http://www.200westmain.com/cart

All nice and white, level, and purdy!

Thanks.

20 Mar 2008, 4:21 AM
#19
henrietta avatar

henrietta

New Zenner

Join Date:
Mar 2007
Location:
WAY out West
Posts:
86
Plugin Contributions:
0

Re: Add links to top bar

Code in post No.9 in this thread, by Kobra.
Also read Post No.13 about moving it left or right.

Good Luck!