Zen Follower
- Join Date:
- May 2008
- Posts:
- 401
- Plugin Contributions:
- 0
Post #1 by pricediscrimination
Hi is there a way to make the sidebars more dynamic like a wordpress site? Or, is this feature built into any of the newer themes?
Zen Follower
Hi is there a way to make the sidebars more dynamic like a wordpress site? Or, is this feature built into any of the newer themes?
Black Belt
Not sure exactly what you mean by 'dynamic'.
Zen Follower
Hi, I mean that you can create different style of sidebars depending on the page the visitor is on. For example, some pages might not even need a side bar such as the shopping cart, etc.
Black Belt
Totally Zenned
Yes... all of this is possible, though not in the same way that WordPress does it. There are a number of techniques, and indeed "combinations" of techniques, which include:
20 years a Zencart User
Black Belt
You can also edit specific sideboxes' module files to control when they will display, if you want that level of granularity.
Zen Follower
stevesh:
General idea here:
Thank you, that's looks like it's going to be helpful!
Zen Follower
schoolboy:
Yes... all of this is possible, though not in the same way that WordPress does it. There are a number of techniques, and indeed "combinations" of techniques, which include:
- Stylesheets (page-specific)
- Edits to tpl_main_page.php
- Settings in layout controllers ( including EZPages, where you can disable columns based on EZPage ID numbers).
Thanks! Is your #3 something to do with the option to turn on and off the center column status in the layout boxes controller? It never works for some reason.
Zen Follower
gjh42:
You can also edit specific sideboxes' module files to control when they will display, if you want that level of granularity.
How about to get rid of the sidebar entirely on the checkout page to make that page full width for example?
Totally Zenned
pricediscrimination:
Thanks! Is your #3 something to do with the option to turn on and off the center column status in the layout boxes controller? It never works for some reason.
No... column control is best-managed by:
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
$flag_disable_right = true;
}
EG
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'shopping_cart')) ) {
$flag_disable_right = true;
}
There are comprehensive NOTES in tpl_main_page.php for column display customisation
Using {display:none} declarations for either the whole column, or even certain sideboxes in a column, you can hide elements on specific pages/categories...
20 years a Zencart User
Zen Follower
schoolboy:
No... column control is best-managed by:
- edits to tpl_main_page.php (where you can disable left/right columns for specific pages)...
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'list_pages_to_skip_all_right_sideboxes_on_here,separated_by_commas,and_no_spaces')) ) {
$flag_disable_right = true;
}
>
> EG
>
> ```php
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'shopping_cart')) ) {
$flag_disable_right = true;
}
There are comprehensive NOTES in tpl_main_page.php for column display customisation
Tried this one so far, and it works flawlessly! Thank you so much. I'll explore the other options too.
Zen Follower
When you empty the cart, it carries over the missing sidebar, is there a way to put the sidebar back in in a situation like this?
Tell staff why this post should be reviewed.