Post by SanSan » Sat Mar 20, 2010 9:01 pm

Hello all,
I have searched the forum for an answer to my question but I can't seem to find anything related to my problem. I'm trying to add a banner to the front of the page, I did it by adding a new div in "header.tpl" under the "breadcrumb" div and it worked and looks like this:

Click for preview

Now what I'm trying to do is when the user goes to a category I need to remove the banner so it looks like this:

Click for preview

Any quick solutions to this?

Newbie

Posts

Joined
Sat Mar 20, 2010 7:29 pm

Post by BISIdesigns » Sat Mar 20, 2010 9:25 pm

Put it in home.tpl instead of header.tpl.

The header.tpl is the top part of all pages. The home.tpl controls just the home page content.

BISI Designs
Professional Website Design
http://www.bisidesigns.com


User avatar
New member

Posts

Joined
Sun Mar 14, 2010 8:32 pm


Post by Qphoria » Sat Mar 20, 2010 9:32 pm

1. EDIT: catalog/view/theme/YOURTHEME/template/common/header.tpl

2. Wherever you are showing that banner, put this if statement around it, like this:

Code: Select all

<?php if (!isset($this->request->get['route']) || $this->request->get['route'] == 'common/home') { ?>
<img src="your/banner/img">
<?php } ?>

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by SanSan » Sat Mar 20, 2010 9:49 pm

Wow you guys answer fast, got 2 solutions in 30 min ;D

BISIdesigns: yes it worked, just needed to add the div after <?php echo $header; ?> my div and then <?php echo $column_left; ?><?php echo $column_right; ?>. Why didn't I think of that? :P

Qphoria: Works great! Brilliant solution to my problem. :D

Thank you all!
Alex

Newbie

Posts

Joined
Sat Mar 20, 2010 7:29 pm
Who is online

Users browsing this forum: No registered users and 26 guests