Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a zen cart shop with a costumized template and for now there is a slideshow gallery under the header. I need to keep this gallery for the first page only, but on all the other pages there should be distinct banners instead of the gallery, relative to the visited page. e.g. on the "about us" page there should be banner_aboutus.ext, contact => banner_contact.ext and so on. Please help me do this. Thanks in advance

share|improve this question
add comment

1 Answer

I've done it the hard way with php - I'm lucky that zen cart allows php in templates... I used conditions with 3 vars: $_GET['main_page'], $_GET['cPath'] and $_GET['id'] and depending on their value I inserted the content I need as follows:

if($_GET['main_page']=='index' && !$_GET['cPath']){ // this condition is met only on the first page
// slideshow
}
elseif($_GET['main_page']=='page' && $_GET['id']==1){
// banner
} // and so on
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.