Besides this tutorial is there any other way of controlling which sideboxes show up on which pages.
I have one sidebox that I would like to ONLY display on the product listing page.
Besides this tutorial is there any other way of controlling which sideboxes show up on which pages.
I have one sidebox that I would like to ONLY display on the product listing page.
Thank you,
autoace
You would use the principles of the tutorial, but change
($this_is_home_page)
to something like
($current_page_base == 'index' and $_GET['cPath'] != '')
There may be a better way of stating it, but that would be the general approach. There is more info like this in the comments at the top of tpl_main_page.php as well.
Glenn,
Now say for the sub-cats, if I wanted to do the same thing, I believe it would be something like:
Am I headed in the right direction?Code:if (in_array($cPath,explode(",",'1,1_12')) )
Or if on the sub-cats I merely wanted to change the width of the column, I could do that via css, correct? something like 1_12.css ?
Thanks for your help.
Thank you,
autoace
Hi Glenn,
I followed your advise and changed the line to what you gave and then included 1,2,3,4,5,6,7,8,9,10 in the single quotes for the cPath. However, its not working the way I want it to.
I just want the sidebox, product_filter.php to show up on the product listing pages for the categories.
I named the variable name from 'featured' to 'product_filter" because thats the name of the file for the sidebox.
What am I doing wrong?
Thank you,
autoace
I can't be sure which part of the test is failing without seeing the whole "if" statement.
Re post 4, both approaches would work. The stylesheet name would be c_1_12.css .
$_GET['cPath'] != '1,2,3,4,5,6,7,8,9,10'
This won't work - you need to use the explode for the list of cats.
in_array($cPath,explode(",",'1,2,3,4,5,6,7,8,9,10'))
If you want to include all subcats as well, you can truncate the value of cPath for the test with (int)PHP Code:if ($current_page_base == 'index' and in_array($cPath,explode(",",'1,2,3,4,5,6,7,8,9,10')) ) {
$show_product_filter = true;
} else {
$show_product_filter = false;
}
in_array( (int)$cPath,explode(",",'1,2,3,4,5,6,7,8,9,10'))