Hi Guys,
I have an identical dilema to the OP but having read your thread cannot get it to work at all. I am a complete amateur with PHP, building my first website in my spare time.
My dilema is that I want a sidebox only to appear in certain categories. Now, here is the original PHP:
PHP Code:
$show_lingerie_sizes_sidebox = true;
if ($show_lingerie_sizes_sidebox == true) {
require($template->get_template_dir('tpl_lingerie_sizes_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_lingerie_sizes_sidebox.php');
$title = BOX_HEADING_LINGERIE_SIZES_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
I've read this thread and tried to implement your advice but what I've come up with just doesn't work at all:
PHP Code:
$show_lingerie_sizes_sidebox = true;
if ($_GET['cPath'] == 8 or $_GET['cPath'] == 9 or $_GET['cPath'] == 33 or $_GET['cPath'] == 34 or $_GET['cPath'] == 35) {
require($template->get_template_dir('tpl_lingerie_sizes_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_lingerie_sizes_sidebox.php');
$title = BOX_HEADING_LINGERIE_SIZES_SIDEBOX;
$title_link = false;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
} else {
$show_lingerie_sizes_sidebox == false;
}
With the original PHP the sidebox appears on all pages. When I upload my modified PHP then the sidebox simply doesn't appear at all. Please, could you tell me where I'm going wrong? I know it's something silly and it would be such a fantastic help.
Bookmarks