Hey all,
i would like to hide selectively, on page basis, the right and/or left column. How can i achieve this in opencart 1.4.8 without modyfing the controller?
It would be also nice to add an ID or CLASS on the body tag for every page so to customize the layout of each page by css. is it possible?
i would like to hide selectively, on page basis, the right and/or left column. How can i achieve this in opencart 1.4.8 without modyfing the controller?
It would be also nice to add an ID or CLASS on the body tag for every page so to customize the layout of each page by css. is it possible?
To add a unique div based on the page, put
This will give for example
product-category as the id for the product/category route,
common-home for either the default home page url or the route common/home
pretty self explanatory
then to hide the columns on that page, use css with the id and the column selector setting display:none
Code: Select all
<body id="<?php echo empty($this->request->get['route']) ? 'common-home' : str_replace('/', '-', empty($this->request->get['route'])); ?>">
product-category as the id for the product/category route,
common-home for either the default home page url or the route common/home
pretty self explanatory
then to hide the columns on that page, use css with the id and the column selector setting display:none
Have a look at jquery, things like:-
$('.#column_right').hide()
Are quick ways to hide content whilst other methods allow you to resize div etc to get the layout you want.
$('.#column_right').hide()
Are quick ways to hide content whilst other methods allow you to resize div etc to get the layout you want.
www.opencartstore.com
Get OpenCart Templates and OpenCart Modules.
Hi Jay6390, can you clarify your solution? I was able to get a body id for my homepage but not the rest of the pages. I used this coding you put:
<body id="<?php echo empty($this->request->get['route']) ? 'common-home' : str_replace('/', '-', empty($this->request->get['route'])); ?>">
I don't know what to add to this coding for the rest of the pages. Thanks!
7:)
<body id="<?php echo empty($this->request->get['route']) ? 'common-home' : str_replace('/', '-', empty($this->request->get['route'])); ?>">
I don't know what to add to this coding for the rest of the pages. Thanks!
7:)
Code: Select all
<body id="<?php echo empty($this->request->get['route']) ? 'common-home' : str_replace('/', '-', empty($this->request->get['route'])); ?>">
Code: Select all
<body class="<?php echo empty($this->request->get['route']) ? 'common-home' : str_replace('/', '-', $this->request->get['route']); ?>">

Find and get many various of opencart modules, themes, mods, etc for your opencart store at http://www.openmycart.com/oc/, OPENCART SITE customization and Maintenance supports at here
Who is online
Users browsing this forum: No registered users and 8 guests