Mobile app version of vmapp.org
Login or Join
Si4351233

: Zen Cart - different banners for each page 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

@Si4351233

Posted in: #Cms #Css #Html #Php #ZenCart

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

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

1 Comments

Sorted by latest first Latest Oldest Best

 

@Angela700

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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme