New Zenner
- Join Date:
- Oct 2009
- Posts:
- 93
- Plugin Contributions:
- 0
Add sidebox in Product Listing Page
How can i add a sidebox in a product listing page?
Views: 574
New Zenner
How can i add a sidebox in a product listing page?
Black Belt
Look at the numerous commented items in tpl_main_page.php
There are many examples that you can use or modify for pages you want
New Zenner
Yes you are right but if i add anything under "right column" it will appear on all pages. I want that only on product listing pages which has the following urls:
https://www.xxxxxxxxxx.com/index.php?main_page=index&cPath=11_200_201
Now how can i detect the product listing page in tpl_main_page.php ?
Like
If (Product_listing_Page) then
{
Show right column text
}
............
Please help me out.
Black Belt
An individual sidebox will not be controlled in tpl_main_page.php, but in its own module file
(/includes/modules/sideboxes/your_template/sidebox_name.php). You will see something like this near the top of the file:
$show_sidebox_name = true;
if ($show_sidebox_name == true;) {
For your example, you would do something like this:```php
if ($current_page_base == 'index' and $_GET['cPath'] == '11_200_201') {
$show_sidebox_name = true;
} else {
$show_sidebox_name = false;
}
if ($show_sidebox_name == true;) {
Tell staff why this post should be reviewed.