Post by benmatewe » Tue Oct 06, 2009 1:44 am

Whats involved in having a single column layout on the homepage. I don't need the sidebars on the homepage. I need the sidebar on all the pages except the homepage. Its like in ZenCart where you have the option of controlling which pages a sidebar can appear. Thats what i'm trying to achieve.

Newbie

Posts

Joined
Mon Sep 07, 2009 4:53 am

Post by Qphoria » Tue Oct 06, 2009 2:35 am

Ok, I've cleaned up the topic to be clearer.

The answer to the above is:
1. EDIT: catalog/view/theme/default/template/common/layout.tpl
2. FIND:

Code: Select all

<div id="column_left">
    <?php foreach ($modules as $module) { ?>
    <?php if ($module['position'] == 'left') { ?>
    <?php echo ${$module['code']}; ?>
    <?php } ?>
    <?php } ?>
  </div>
  <div id="column_right">
    <?php foreach ($modules as $module) { ?>
    <?php if ($module['position'] == 'right') { ?>
    <?php echo ${$module['code']}; ?>
    <?php } ?>
    <?php } ?>
  </div>
3. REPLACE WITH:

Code: Select all

<?php if (sizeof($breadcrumbs) > 1) { ?>
  <div id="column_left">
    <?php foreach ($modules as $module) { ?>
    <?php if ($module['position'] == 'left') { ?>
    <?php echo ${$module['code']}; ?>
    <?php } ?>
    <?php } ?>
  </div>
  <div id="column_right">
    <?php foreach ($modules as $module) { ?>
    <?php if ($module['position'] == 'right') { ?>
    <?php echo ${$module['code']}; ?>
    <?php } ?>
    <?php } ?>
  </div>
<?php } ?>
That will show the sidebars on all pages except the homepage

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by benmatewe » Tue Oct 06, 2009 3:40 am

@Qphoria Like magic! Thanks.

Newbie

Posts

Joined
Mon Sep 07, 2009 4:53 am
Who is online

Users browsing this forum: No registered users and 4 guests