Hide Sidebar on VM product page only

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sat May 25, 2013 6:24 am
Reply with quote
Report this post
Hi there, I am trying to make it so that the sidebar does not display on VM product pages only. but must display in category view.

The sidebar modules are only set to display in the menu item for the VM category but when you click on a product, it still loads the sidebar even though its not associated with a link from products. I assume its because it is getting the same settings from the category.

So my question is how do I make it so the sidebar does not appear in my VM product pages?

Here is my temp URL www.kanzenint.com/iaso and if you go to Backup Plans menu link, thats where the category and products are listed.

Thanks.
User avatar
Gold Boarder

teitbite
Sun May 26, 2013 8:05 am
Reply with quote
Report this post
Hi

I think You just need to add this code to product layout in /html/com_virtuemart/productdetails/default.php

Code: Select all
<style type="text/css">
#gkSidebar { display: none; }
</stlye>
User avatar
Moderator

GK User
Sun May 26, 2013 2:20 pm
Reply with quote
Report this post
teitbite wrote:Hi

I think You just need to add this code to product layout in /html/com_virtuemart/productdetails/default.php

Code: Select all
<style type="text/css">
#gkSidebar { display: none; }
</stlye>


Thanks I will give it a shot. Didnt know I could do that on a VM template
User avatar
Gold Boarder

teitbite
Tue May 28, 2013 7:18 am
Reply with quote
Report this post
Hi

Adding a css inside code is not the most elegant way of doing it, but this time it's required to remove sidebar only from product detail layout.
User avatar
Moderator

GK User
Mon Dec 16, 2013 4:11 am
Reply with quote
Report this post
teitbite wrote:Hi

Adding a css inside code is not the most elegant way of doing it, but this time it's required to remove sidebar only from product detail layout.


HI, I just tried this and it removed the sidebar but the rest of the page including #GKbottom etc have disappeared. Is there a particular place or in some other coding I need to put as I put it at the very top and the first 30 or so lines are this:

Code: Select all
<style type="text/css">
#gkSidebar { display: none; }
</stlye>

<?php
/**
 *
 * Show the product details page
 *
 * @package   VirtueMart
 * @subpackage
 * @author Max Milbers, Eugen Stranz
 * @author RolandD,
 * @todo handle child products
 * @link http://www.virtuemart.net
 * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
 * VirtueMart is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses.
 * @version $Id: default.php 5151 2011-12-19 17:10:23Z Milbo $
 */
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

User avatar
Gold Boarder

GK User
Mon Dec 16, 2013 4:23 am
Reply with quote
Report this post
teitbite wrote:Hi

I think You just need to add this code to product layout in /html/com_virtuemart/productdetails/default.php

Code: Select all
<style type="text/css">
#gkSidebar { display: none; }
</stlye>



Is ok, I noticed you typed 'Style' as stlye. So I have fixed that now. Seems to be ok. Thanks.
User avatar
Gold Boarder

teitbite
Tue Dec 17, 2013 6:40 pm
Reply with quote
Report this post
Hi

Very sorry for that. A common typo mistake. 'm glad it's working now :)
User avatar
Moderator


cron