Inactive
- Join Date:
- Aug 2006
- Location:
- Singapore
- Posts:
- 167
- Plugin Contributions:
- 1
IF statement to turn off left/right column on category page
Hi all..
I tried to insert an IF statement in tpl_main_page.php so that I can turn off different left or right column combination in category and subcategory page.... I also need this IF statement for other purpose.
-
Category page, i.e https://www.mysite.com/index.php?main_page=index&cPath=1
I need to turn off left column, turn on right column on this page -
Sub-category page, i.e https://www.mysite.com/index.php?main_page=index&cPath=1_10
I need to turn on left column, turn off right column on this page
I tried the following codes:
if ($current_page=='index' && (int)$cPath>0) {
$flag_disable_left = true;
}
if ($current_page=='index' && $cPath>0 && (int)cPath_array>0) {
$flag_disable_right = true;
}
Anyhow the 2nd if statement didn't work for sub-category page. 1st if statement works.
Please Zenner help me out.... thanks!