header links

Locked
Results 1 to 20 of 21
This thread is locked. New replies are disabled.
09 Apr 2008, 12:51
#1
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

header links

Hello, I know how to put links in the header but I can't figure out how to make those links put the pages in the main page area. for example, I have made a page called chillers so in my tpl_header.php i placed

<li><a href="index.php?main_page=chillers">Chillers</a></li>

and now the link shows in the header but when it is clicked, i get a 404 error in the main page area. I placed the chillers page in includes/languages/english/html_includes/classic. I'm new to php so I don't know if this is right, kind of just being piecing things together from other threads.

did i put the file in the wrong place or did i just not do anything right at all is basically what i am asking
09 Apr 2008, 13:19
#2
fantasticals avatar

fantasticals

New Zenner

Join Date:
Mar 2007
Posts:
73
Plugin Contributions:
0

Re: header links

Have you only added a file to:

includes/languages/english/html_includes/classic

for you new page ?

If so theres a few other files that need to be added for the page to work, i would take a look at the about us module in the downloads section this can be customised to add new pages.
09 Apr 2008, 13:59
#3
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

what other files would need to be added?
09 Apr 2008, 14:02
#4
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
0

Re: header links

Have you considered using an EZ page?
09 Apr 2008, 14:16
#5
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

i have but i cannot figure out how to do it. i've created ez pages but the links are not showing, i don't know what i am doing wrong.
09 Apr 2008, 15:59
#6
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: header links

EZ-Pages was created to achieve just what you want to do. Try to avoid hacking the code if you can - - - it often leads to other problems.

To see how I configured a header menu using EZ pages, take a quick look at:-

www.sa-shop.co.uk
09 Apr 2008, 16:58
#7
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

that is exactly how i want it to look but my ez pages bar is not showing up and i cannot figure out why.
09 Apr 2008, 17:07
#8
steven300 avatar

steven300

Totally Zenned

Join Date:
Jan 2008
Posts:
1,564
Plugin Contributions:
0

Re: header links

First, check that Admin>Configuration>EZ-Pages Settings>Display Status - HeaderBar is set to 1

Then go to Admin>Tools>EZ-Pages, do you have some EZ pages setup to show in the header? In the Header column, are there pages in the list which have a green box?
09 Apr 2008, 17:12
#9
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

nevermind, it was a dumb thing. i did not have a sort order on the pages:oops:
09 Apr 2008, 17:35
#10
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: header links

fsicody:

it was a dumb thing. i did not have a sort order on the pages:oops:


Don't be critical of yourself... I spent some days trying to figure out the same issue when I started using ezpages!
09 Apr 2008, 17:38
#11
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

next issue is changing the font color of the links, i've seen other threads on how to do it so i try same thing but no go, i don't think i'm editing the right css file, any ideas?
09 Apr 2008, 18:18
#12
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: header links

Do you have FireFox browser? If so, go grab a couple of useful add-ons:-

* Web Developers Toolkit by Chris Pederick
* Firebug
* Colorzilla

These are some of the tools that many of us forum posters use to check out novice users' websites to look for behind-the-scenes stuff that build a page - such as CSS.

You will - for example - be able to see what styles apply to every defined DIV on a webpage, and be able to change the css off-line to see what the result will look like.
09 Apr 2008, 18:35
#13
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

wow, those tools worked great. thank you very much
09 Apr 2008, 18:52
#14
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

ok the only problem now is that after a link is clicked, it changes to a different color which is fine for the rest of the links but i want my ez page links to always be one color except for when hovering. http://flowsolutions1.com/test
09 Apr 2008, 19:05
#15
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: header links

The standard zencart stylesheet often "groups" a number of style ID's and classes, as this is more efficient.

Sometimes, to get one element to display differently from others that "share" a style set, you have to SEPARATE it from the "group" and apply a different set of styles... EG:

THIS:-


a:hover, #navEZPagesTOC ul li a:hover, #navMain ul li a:hover, #navSupp ul li a:hover, #navCatTabs ul li a:hover {
color: #FF0000;
}

BECOMES THIS, if you want to split out #navEZPagesTOC ul li a:hover and give it its own style:-


a:hover, #navMain ul li a:hover, #navSupp ul li a:hover, #navCatTabs ul li a:hover {
color: #FF0000;
}

#navEZPagesTOC ul li a:hover
, {
color: #FFCC33;
}
09 Apr 2008, 19:06
#16
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

Ok, i've figure out something that seems a lot easier to me, make the ez page, do not make ez page navigation visible and add links to the header that point to the ez page, all my problems solved, i hope.
09 Apr 2008, 19:13
#17
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: header links

fsicody:

Ok, i've figure out something that seems a lot easier to me, make the ez page, do not make ez page navigation visible and add links to the header that point to the ez page, all my problems solved, i hope.



Other way round is easier... make the ez-page links visible and hide the static links in the header...

remember, the header will also show (if configured) links such as My Account, Shopping Cart, Checkout, etc.

With EZ-Pages, you can ALSO create internal links. At the bottom of the EZ-Page edit screen is an input field for internal links (followed by one for External Links)

If you want your "Home" link to appear in your ez-pages header, then you create a new ez-page called "Home", leave all the text part blank, and put into the "internal links" field "index.php".

For Contact Us, (the standard Contact Us page is a DEFINED page, and the URL to it is:- index.php?main_page=contact_us

So you would create a new zepages "page", call it "Contact Us", then in the internal URL field, put "index.php?main_page=contact_us"

I disable many of the "More Information" and "Information" type sideboxes and use the ezpages sidebox for all my info links - it's much easier... and...

There's no core code to hack!
09 Apr 2008, 19:20
#18
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

last question, then i'm done cuz i need to smoke, how do i get rid of the gap between my banner and my links?
09 Apr 2008, 20:24
#19
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Posts:
2,957
Plugin Contributions:
0

Re: header links

fsicody:

last question, then i'm done cuz i need to smoke, how do i get rid of the gap between my banner and my links?



If you look at the SOURCE CODE of the home page, you will see (near the top):-

[HTML]<div id="navMainSearch"><form name="quick_find_header" action="http://flowsolutions1.com/test/index.php?main_page=advanced_search_result" method="get"><input type="hidden" name="main_page" value="advanced_search_result" /><input type="hidden" name="search_in_description" value="1" /><input type="text" name="keyword" size="6" maxlength="30" style="width: 100px" value="Enter search keywords here" onfocus="if (this.value == 'Enter search keywords here') this.value = '';" onblur="if (this.value == '') this.value = 'Enter search keywords here';" /> <input type="submit" value="Search" style="width: 45px" /></form></div>
<br class="clearBoth" />
</div>
<!--eof-navigation display-->[/HTML]

The problem could be:-

[HTML]<br class="clearBoth" />[/HTML] (effects a line break)

And to see if that IS the issue, do this:-

Go to:

includes\templates\template_default\common\tpl_header.php

Send a copy of tpl_header.php to your hard drive and open it for editing in a good plain text editor.

Around lines 64, 65, 66, you will see:-

[PHP]<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>
<br class="clearBoth" />
</div>[/PHP]

COMMENT OUT the <br class="clearBoth" />

<!--<br class="clearBoth" />-->

Save the file.

You now need to FTP it to:

includes\templates\classic\common\tpl_header.php

(If you don't have a folder in "classic" called "common", create one.)

See if this works. If not, you can UNDO the changes - or just delete the tpl_header.php in classic\common.

(This leaves the ORIGINAL in the template_default\common folder, which will then kick in.)
09 Apr 2008, 20:28
#20
fsicody avatar

fsicody

New Zenner

Join Date:
Apr 2008
Posts:
36
Plugin Contributions:
0

Re: header links

that was it, thank you so much for all your help