Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Adding links to the header & footer

Adding links to the header & footer

Locked

Views: 3,089

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
27 Nov 2008, 12:22 PM
#1
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Adding links to the header & footer

Hi everyone,,, another simple question from me but I cant find the answer in the BoK or forums.

im embarrassed to ask but..

how do I add links to my header and footer bar?

for instance, the ‘home’ link is already in both bars but how can I add a link for example ‘find us’ or ‘contact us’ in the header and links relating to T & C and legal stuffs in the footer?

I have included a screen dump to illustrate..

p.s. the site is off line at the mo so I cant give a live demo :(

27 Nov 2008, 2:04 PM
#2
redrob avatar

redrob

New Zenner

Join Date:
May 2008
Location:
UK
Posts:
83
Plugin Contributions:
0

Re: Adding links to the header & footer

To add links/text on header go to: includes/languages/english/classic/header.php

To add links/text on footer go to: includes/languages/english/classic/english.php

27 Nov 2008, 5:55 PM
#3
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: Adding links to the header & footer

hi,

i thought about that.. but thought there would be an easier way to do it.. i found that easier way via EZ-Pages but it raises one more question..

ezpages allows for the creation of a sidebox, and it places the links in the footer without the need to amend code and fanny about with files...

BUT.. it doesn’t add the links to the header bar, instead it created an additional header bar.. which i dont want... I want the links in the normal header bar where the search & ‘home’ link is..

is that just the way zencart works?...

i have attached a screen dump to illiterate (found at bottom of message)

and what is the work around on this?.. create the pages via ezpages and then amend the

includes/languages/english/classic/header.php

file?

Furthermore, as the ezpages are created & stored in the database, what are peoples opinions on the best way to add header/footer links.. for situations like backing up, mirroring the sever or easy sever-host migration

ezpages
Or
Direct header.php / footer.php hacks

27 Nov 2008, 6:53 PM
#4
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: Adding links to the header & footer

hi,

basically i want to add the EZPAGES links to the header bar, but im not having much success... i did ask a similar question in a different thread but i feel it is posted in the wrong place... anyway, my problem is...

ezpages allows for the creation of a sidebox, and it places the links in the footer without the need to amend code and fanny about with files... (eg includes/languages/english/classic/header.php)

BUT.. it doesn’t add the links to the header bar, instead it created an additional header bar.. which i dont want... I want the links in the normal header bar where the search & ‘home’ link is..

is that just the way zencart works?...

i have attached a screen dump to illiterate (found at bottom of message)

what is the work around on this?.. create the pages via ezpages and then amend the

includes/languages/english/classic/header.php

file?

Furthermore, as the ezpages are created & stored in the database, what are peoples opinions on the best way to add header/footer links.. for situations like backing up, mirroring the sever or easy sever-host migration

ezpages
Or
Direct header.php / footer.php hacks

please help..

28 Nov 2008, 1:13 AM
#5
bobdog avatar

bobdog

Totally Zenned

Join Date:
Mar 2006
Location:
Fresno, California
Posts:
590
Plugin Contributions:
0

Re: Adding links to the header & footer

I always just edit the header and footer files...works for me!

28 Nov 2008, 5:34 AM
#6
kobra avatar

kobra

Black Belt

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

Re: Adding links to the header & footer

what is the work around on this?.. create the pages via ezpages and then amend the includes/languages/english/classic/header.php file?
Yes, this is what you need to do....
Seek the code block/div that creates the header links and move the code into the navMain div - - you will eliminate the other div and most likely run out of space as other items appear in navMain as one logs in and add items to their cart

28 Nov 2008, 6:00 AM
#7
afo avatar

afo

Totally Zenned

Join Date:
Aug 2004
Location:
New York City
Posts:
6,800
Plugin Contributions:
0

Re: Adding links to the header & footer

https://www.zen-cart.com/tutorials/index.php?article=234

If you modify the files in the /classic folders, all your changes will be lost with the next upgrade/update.

28 Nov 2008, 2:33 PM
#8
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: Adding links to the header & footer

sorry.. how do i do that?...

i have limited coding knowledge or skill...

i followed the instructions on the link for article 234 and it worked, i added a link in the main header bar for the contact us page...

but what i want to do is set it up to automatically add the ezpages links in the main header bar (red) and not create the additional header bar (yellow)

what what folders/files do i need to look in?
what code do i need to copy from the ezpage section and where do i put it in the includes -> templates -> CUSTOM -> common -> tpl_header.php file

or am i not making much sense?

28 Nov 2008, 2:38 PM
#9
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: Adding links to the header & footer

sorry..

i have limited coding knowledge or skill...

i followed the instructions on the link for article 234 and it worked, i added a link in the main header bar for the contact us page...

but what i want to do is set it up to automatically add the ezpages links in the main header bar (red) and not create the additional header bar (yellow)

what what folders/files do i need to look in?
what code do i need to copy from the ezpage section and where do i put it in the includes -> templates -> CUSTOM -> common -> tpl_header.php file

or am i not making much sense?

28 Nov 2008, 4:43 PM
#10
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,602
Plugin Contributions:
0

Re: Adding links to the header & footer

Moderator's note: The 2 threads on the same subject have been merged.

25 Feb 2009, 7:34 PM
#11
hahenry avatar

hahenry

New Zenner

Join Date:
Oct 2008
Posts:
3
Plugin Contributions:
0

Re: Adding links to the header & footer

Wondering if you ended up resolving the header navigation issue (adding EZ-pages links to the header nav) and if you ended up having any further problems.
Setting up a store myself and trying to simplify the nav as much as possible while keeping the update process simple as well.

Thanks!

25 Feb 2009, 9:24 PM
#12
shane78 avatar

shane78

Banned

Join Date:
Oct 2008
Location:
newcastle upon tyne (UK)
Posts:
876
Plugin Contributions:
0

Re: Adding links to the header & footer

i did mate... kind off..

i followed this tutorial
https://www.zen-cart.com/tutorials/index.php?article=234

but i could never work out how to add EZpage links to the header without creating another header bar (i.e. giving me two header bars.. which i thought looked ugly)

so, i created the page i wanted via the EZpages method in the Admin section...

copied and pasted the EZpages generated URL for that page and following the instructions i manually added something like this

** REMOVED BY REQUEST ***

Then that way i can still edit the page via EZpage system... and its added where i wanted it

i did the same again for the footer..

** REMOVED BY REQUEST ***

if you want a look...

let me know if you get stuck again and i'll send you the file in question with comments.. enjoy and welcome to Zen Cart.. its a hard little bugger to learn,, but worth it!!! however, im worried i will have to start all over again from the beginning when ZC 2.0 is released! hahaha!:clap: