Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / creating E-Z page links inside header

creating E-Z page links inside header

Locked

Views: 2,735

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
15 Sep 2006, 4:46 AM
#1
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

creating E-Z page links inside header

I'm trying to add links inside my main header. on top of my LogoWrapper background image. Vertically centered, justified right. I was able to do it with html, but my side that appreciates ZenCart so much got me to remove it and try and do it right...

how would I create links (i've already created them in EZ-Pages) in the main part of my header. without the EZpages bar. free floating, with independent CSS ID's.

I've been following a bunch of similar posts, but none are right on for me, and i'm spending hours moving things back and forth, with no avail.

thanks so much in advance.

ps. i'm also using SEO URL's so i'm not sure how to find the page number anymore...

16 Sep 2006, 7:44 PM
#2
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: creating E-Z page links inside header

please, if anyone has any ideas... i've seen it done on so many sites, but don't know the proper code.

just links inside the logowrapper...

thanks.

16 Sep 2006, 10:06 PM
#3
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: creating E-Z page links inside header

You can find your EZ-Pages page number from the Admin > Tool > EZ-Pages screen. Then just insert <?php echo zen_ez_pages_link(PAGE_NUMBER) ?> where you want the link to appear.

16 Sep 2006, 11:29 PM
#4
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: creating E-Z page links inside header

that was exactly what i needed, Kuroi.

thanks again!

16 Sep 2006, 11:41 PM
#5
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: creating E-Z page links inside header

doh'

one other related question.

so i got the links to show up:

<div id="myLinks">
	<a href="<?php echo zen_ez_pages_link(1) ?>"><?php echo EZ_PAGE1; ?></a>
	<a href="<?php echo zen_ez_pages_link(2) ?>"><?php echo EZ_PAGE2; ?></a>
	<a href="<?php echo zen_ez_pages_link(3) ?>"><?php echo EZ_PAGE3; ?></a>
	<a href="<?php echo zen_ez_pages_link(4) ?>"><?php echo EZ_PAGE4; ?></a>
	<a href="<?php echo zen_ez_pages_link(5) ?>"><?php echo EZ_PAGE5; ?></a>
	</div>

and then began to position the links with CSS.

#myLinks {float:right;margin-right:30px;}

it seems to work fine, except that they move as a whole. and i need to spread them out a bit.

is there a way to create a margin in-between them. or should i give each of them their own Div ID?

thanks again.

17 Sep 2006, 12:10 AM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: creating E-Z page links inside header

No need to give them their own DIVs. Either float them or add display:block to their styling and you will be able to do most anything you would do to them in blocks anyway e.g. line them up, add width and height, padding them or use margins, etc.

Also the full specification of the zen_ez_pages_link is:

function zen_ez_pages_link($ez_pages_id, $ez_pages_chapter = 0, $ez_pages_is_ssl = false, $ez_pages_open_new_window = false, $ez_pages_return_full_url = false)

If you set that final parameter to true, the function will stick in the A tags and the link text for you.

17 Sep 2006, 12:47 AM
#7
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: creating E-Z page links inside header

thanks, kuroi. i'll be working on it...

18 Sep 2006, 6:07 AM
#8
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: creating E-Z page links inside header

i've been trying the "display:block", but it seems to have no effect on the page at all. margins and padding remains only effecting the entire group of links.

the float:right has its obvious effect, but i still can't seem to separate the margins or padding.

any ideas what i'm missing?

they are all in the same div. and are separated by php tags. i was not able to get the 'function' link to work, but the href still seems to work fine.

any advice would be appreciated.

thanks.

18 Sep 2006, 7:20 AM
#9
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: creating E-Z page links inside header

Looking back up this thread, I realise that I should have addressed your CSS earlier. Are ytou still applying it to the "#myLinks ID"? If so, that would explain why they all move together. You would need to apply your styling to "#myLinks a" to affect them individually, e.g. to add extra vertical padding between them.

If this is what you are doing and it's not woking for you, do you have a URL that I could see?