I want to display some of my sideboxes on my front page only, and suppress them from all other pages.

No problem. Let's use the featured product sidebox as an example.

Create an over-ride for the sidebox's module file. For the featured products sidebox, this would involve copying includes/modules/sideboxes/featured_products.php to includes/modules/sideboxes/YOUR_TEMPLATE_NAME/featured_products.php.

Open up your new sidebox module file and take a look at the code. In Zen Cart 1.3.x most will look something like this
<?php

BIG COMMENT BLOCK

// test if box should display
  $show_featured= true;

  if ($show_featured == true) {

  MAIN PROCESSING BLOCK

  }
?>


All we need to do is to change the line that reads
  $show_featured= true;
into
  if ($this_is_home_page) {
    $show_featured = true;
  } else {
    $show_featured = false;
  }

If your sidebox module doesn't have a conditional such as if ($show_featured == true) { ... } wrapped around the code,
then just add it (changing the variable name to something suitable and unique for your sidebox to avoid unintentionally turning off other sideboxes.
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

How can I find out what version of Zen Cart or PHP or MySQL I'm using?

To find out what version of Zen Cart or PHP or MySQL you are currently using, you can simply go...

Getting a BLANK PAGE? Here's the answer ...

If you're getting a blank page when trying to browse to a certain page on your store, or after...

What's New in the Upcoming v2.0 release?

Database Abstraction Layer and Sql CacheThe abstraction layer has been re-factored to include a...

Image Preparation - How-to

I've seen several posts where people obviously aren't quite sure about the best way to set up...

Some tips to modify stylesheet

1. Download Web Developer extension for FireFox here2. Install & restart FireFox. You should...