Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / need to find a way to insert html in top banner of main page

need to find a way to insert html in top banner of main page

Locked

Started by what44 on 27 Oct 2007, 1:36 AM · Views: 2,583

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
27 Oct 2007, 1:36 AM
#1
what44 avatar

what44

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

Post #1 by what44

does anyone know how i might do this?
thanks in advance

cheers

simon

27 Oct 2007, 1:58 AM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,761
Plugin Contributions:
0

Post #2 by Kim

Put it in the tpl_header.php for your custom template.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

27 Oct 2007, 5:24 PM
#3
what44 avatar

what44

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

Post #3 by what44

thanks for that. where is this file located , whats the path?

27 Oct 2007, 5:42 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #4 by gjh42

/includes/templates/your_template/common/tpl_header.php.

If you don't have a copy there yet, take it from /includes/templates/template_default/common/tpl_header.php, edit and save as /includes/templates/your_template/common/tpl_header.php.

27 Oct 2007, 6:17 PM
#5
what44 avatar

what44

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

Post #5 by what44

ok, found it now. looks a bit complex in there. where would i add my htnl code? any suggestions?

27 Oct 2007, 7:18 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #6 by gjh42

That depends on what you want to add, and where you want it to show up. The header elements are organized in code blocks marked off with identifying comments like <!--bof xxxx-->. They appear generally in the same order in the file as onscreen, so you can use them as a guide. For more detailed advice, we need more information from you.

29 Oct 2007, 8:42 AM
#7
graphicman avatar

graphicman

New Zenner

Join Date:
Dec 2004
Location:
Wakefield. UK
Posts:
82
Plugin Contributions:
0

Post #7 by graphicman

gjh42:

That depends on what you want to add, and where you want it to show up. The header elements are organized in code blocks marked off with identifying comments like <!--bof xxxx-->. They appear generally in the same order in the file as on screen, so you can use them as a guide. For more detailed advice, we need more information from you.

Hi Glenn, i also want to do the same, the site is for a customer who wants a banner putting in the middle of the header. This is going to be an adult DVD site but there are no images on it yet.

I haven't made the banner yet but it will fit within the header comfortably. I would really appreciate some help with the code.
The site is here

Many Thanks

29 Oct 2007, 1:43 PM
#8
trvlfox avatar

trvlfox

Zen Follower

Join Date:
Aug 2007
Location:
Fort Worth, Texas, United States
Posts:
156
Plugin Contributions:
0

Post #8 by trvlfox

I started off using a template that had most of the configuration I wanted and than went from their. Check out the templates under downloads. I believe there is one with a header banner.

Vicky
Compass Web Services - Templates for Zen Cart
http://www.compasswebservices.com/

29 Oct 2007, 4:55 PM
#9
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #9 by gjh42

I really don't have any idea what your banner code should look like. I can only advise you about code placement within the file. There is a header banner built into Zen Cart - the display code is in the branding display section of tpl_header.php. You should be able to either use or modify that to suit your needs.
You might check the FAQ/tutorials for information on banner use.

If you want the banner to go in the open space between your logo and tagline, be aware that your template has a fluid layout and will expand and contract to fit the window. If the window is small, a banner in that location may cause overlapping or other undesirable effects.

You may be able to use min-width: on #mainWrapper to ensure that the page doesn't try to shrink beyond a reasonable size.

31 Oct 2007, 4:45 AM
#10
scitrenbaum avatar

scitrenbaum

New Zenner

Join Date:
Sep 2007
Posts:
23
Plugin Contributions:
0

Post #10 by scitrenbaum

I have loaded html into my tpl_header.php, however the images don't show up in IE6. I am normally quite well versed in getting stuff to work cross-browser, but this is baffling me. Anyone have any idea why my html within the tpl_header would work in Firefox but not in IE? Any help would be greatly appreciated, as I am trying to launch the site and this is a major hold up.

Here is a link to a sample page

http://www.scentimentalprints.com/catalog/index.php?main_page=index&cPath=65&zenid=5565dc1da443725729e6dc0cf4376325

The buttons at the top (Girls Announcements, Girls Invitations, etc) are additional html added to the tpl_header file.