How to Create Top Banner?
I tried really hard to find an answer to this before posting because it seems so easy, however, I can't figure this out for the life of me... I want to create a banner across the top of my site.
I've uploaded a banner image and created its own banner group in the banner manager. I then added the banner group name to 'Banner Display Groups - Header Position 1'. This should be it right? I should then see a banner over the top of my site, or am I missing something?
www.giftbasketsforever.com
Version 1.3.9h
Re: How to Create Top Banner
That should place your image above the mainwrapper, if the image is in the path you specified when you created the banner. I would double-check that path first.
Re: How to Create Top Banner
Hi
Did it appear in the center box?
I'm fairly new to this and someone far more qualified will be along shortly with a bit of luck. However, this is what I have done so far (a work in progress - please please back up your files!) to move the banner I created, from the the center position on in the main center box, to the top right next to / opposite my logo.
Maybe you can play with it and figure out the rest from here I don't know, but like I say, I'm pretty new to this lark so please please back up all files.
Here is is... I removed this from file tpl_index_default.php
<?php
if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
and added it to file tpl_header.php inbetween
<!--bof-branding display-->
and
<!--eof-branding display-->
Like this...
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>
<?php
if (SHOW_BANNERS_GROUP_SET1 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET1)) {
if ($banner->RecordCount() > 0) {
?>
<div id="bannerOne" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
<?php
}
}
?>
</div>
</div>
<div class="clearBoth"></div>
<!--eof-branding display-->
Hope this is helpful and my sincere apologies if it is flawed advice.
Cheers
Matt
Re: How to Create Top Banner
The stock banner group 1 code is in /includes/templates/your_template/common/tpl_main_page.php (right after the <body> tag), not in tpl_index_default.php.
You can move it to tpl_header.php if you specifically want it not to be above the entire header div, but inside the header div.
Re: How to Create Top Banner
Quote:
Originally Posted by
stevesh
That should place your image above the mainwrapper, if the image is in the path you specified when you created the banner. I would double-check that path first.
The image file is in the path. I uploaded the image into another banner that's already displaying to be absolutely sure.
It appears that the only banners that display on my site are the two on my home page (BannerOne and BannerTwo group names). I can't get any other banner in banner manager to show up anywhere on my site.
The weird thing is that I don't see BannerOne or BannerTwo group names anywhere on the Layout Settings page. Aren't I supposed to see the banner group next to one of the 'Banner Display Group' lines?
Re: How to Create Top Banner
By the way I tried multiple group names on the Header Position 1 just to be sure and I can't get anything to show.
Banner Display Groups - Header Position 1 test:bannerOne:bannerTwo
Re: How to Create Top Banner
Apparently there is at least one custom template that has removed banner group 1 from its top-of-the-screen position, either to put it elsewhere or delete it. Seeing your site live may help us diagnose your situation.
Re: How to Create Top Banner
Quote:
Originally Posted by
gjh42
Apparently there is at least one custom template that has removed banner group 1 from its top-of-the-screen position, either to put it elsewhere or delete it. Seeing your site live may help us diagnose your situation.
Thank you. Site is live... www.giftbasketsforever.com
Re: How to Create Top Banner
Banner group 1 has been moved from top of screen to bottom of header, at the left of the slider. The only banner group comment tags I see are for banner group 5, just above the footer. If you don't plan to use that, you could move it to the top in tpl_main_page.php as described above.
Re: How to Create Top Banner
Quote:
Originally Posted by
gjh42
The stock banner group 1 code is in /includes/templates/your_template/common/tpl_main_page.php (right after the <body> tag), not in tpl_index_default.php.
You can move it to tpl_header.php if you specifically want it not to be above the entire header div, but inside the header div.
Quote:
Originally Posted by
gjh42
Banner group 1 has been moved from top of screen to bottom of header, at the left of the slider. The only banner group comment tags I see are for banner group 5, just above the footer. If you don't plan to use that, you could move it to the top in tpl_main_page.php as described above.
I'm very new to Zen Cart and I want to make sure I understand this before I attempt this...
I'm going to cut the banner group 1 code in /includes/templates/your_template/common/tpl_main_page.php and paste it in tpl_header.php?
Then I'm going to use banner group 5 for the banner and place the group name on Banner Display Groups - Header Position 1 under display settings?