You are here:  » Is it possible to show banner when filter list isn't visible?

Support Forum



Is it possible to show banner when filter list isn't visible?

Submitted by bat on Fri, 2011-12-23 12:16 in

Hi David
I've got an odd question which I don't know if it's even possible to do....
The filter sidebar only appears when there's something to query it, other than that it's a blank space/hidden.
What I wanted to do is put a banner advert in it's place when the filter sidebar is not visible (such as the index page) and the banner to be hidden/disappear when the filter list needs to be visible.

As it stands, there's just a big empty space which I'd like to put a skyscraper advert on, but if I do it at the moment, it ends up being underneath the filter sidebar when that's active and it looks daft.

Thanks
Bat

Submitted by support on Fri, 2011-12-23 13:47

Hi,

Sure - the sidebar filter code is displayed based upon the IF statement at line 13 of the modified html/searchresults.php:

if (strpos($_SERVER["PHP_SELF"],"search.php"))
{

...so to display a banner when there are no filters to show; look for the closing } of that statement which is at line 102 in the download:

}

...and REPLACE with:

}
else
{
?>
<!-- banner HTML code here -->
<?php
}

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Fri, 2011-12-23 15:37

Perfect! Thank you. This PHP thing is like magic, blows my mind every time.