Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Placing of Categories

Placing of Categories

Locked

Views: 1,540

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
27 Feb 2009, 12:55 PM
#1
butchx5 avatar

butchx5

New Zenner

Join Date:
Nov 2008
Posts:
69
Plugin Contributions:
0

Placing of Categories

Hi
I did a search but wasn't able to find a solution so here goes:

I have managed to get the main page to look how I want, i.e. categories showing in centre section only.

However, I cannot work out how to turn the categories sidebox ON for the other pages, I suspect I may need to write an overide somewhere but need some advice.

Can anyone help?

Helen

27 Feb 2009, 3:32 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Placing of Categories

includes.modules/sideboxes/CUSTOM/categories.php

If you haven't modified this file, just paste this code into it to turn the categories sidebox off on the main page but show it on all others:

<?php /** * categories sidebox - prepares content for the main categories sidebox * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: categories.php 2718 2005-12-28 06:42:39Z drbyte $ */ if ($this_is_home_page) { $show_categories = false; } else { $show_categories = true; } if ($show_categories == true) { $main_category_tree = new category_tree; $row = 0; $box_categories_array = array(); // don't build a tree when no categories $check_categories = $db->Execute("select categories_id from " . TABLE_CATEGORIES . " where categories_status=1 limit 1"); if ($check_categories->RecordCount() > 0) { $box_categories_array = $main_category_tree->zen_category_tree(); } require($template->get_template_dir('tpl_categories.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_categories.php'); $title = BOX_HEADING_CATEGORIES; $title_link = false; require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); } ?>
27 Feb 2009, 5:02 PM
#3
butchx5 avatar

butchx5

New Zenner

Join Date:
Nov 2008
Posts:
69
Plugin Contributions:
0

Re: Placing of Categories

Hi

THANKS! it worked :clap:

I will admit that it didn't work to begin with - then I realised I had to switch the sidebox back on in Admin/Tools/Layout Settings/sideboxes! :wacko:

Have a good weekend.
Helen

18 Dec 2009, 2:18 AM
#4
dimascus avatar

dimascus

New Zenner

Join Date:
Jan 2009
Posts:
24
Plugin Contributions:
0

Re: Placing of Categories

Wow... ok this worked but now my index page is funky.

It still has the room where the sidebox would be, but it just does not show a sidebox.

Anyway to fix this?

SITE:
www.mommyandmecreations.com

Thanks for the look-into!

18 Dec 2009, 10:48 AM
#5
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Placing of Categories

I'm just guessing, but I'd say you didn't paste the code properly. Try replacing that file with the original to see if the sidebox comes back, then try copy and paste again (with, of course, a text editor).