Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

Your Answer


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.