Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » How to remove sidebar-1 on cart and...
How to remove sidebar-1 on cart and checkout?
How to remove sidebar-1 on cart and checkout?
so i installed metamod (free version) and i wanted to removed all modules in the sidebar-1 on the virtuemart checkout and cart pages.
i am using the code i found on your page. problem is it does not work.
metamod is published in the sidebar-1 as well.
Code:
$vm = JomGenius("virtuemart");
if ( ! $vm->check("pagetype starts with checkout, cart") ) return sidebar-1;
could you please tell me what to do and guide me in the right direction?
thanks so much!
Re: How to remove sidebar-1 on cart and checkout?
Hi Dorkus,
The first thing I noticed is that you need to put quotes around the name of the module position, e.g.
$vm = JomGenius("virtuemart");
if ( ! $vm->check("pagetype starts with checkout, cart") ) return "sidebar-1";
However your setup also needs some changes. I would suggest the following:
1 - keep the MetaMod in sidebar-1
2 - move all the other modules that were in sidebar-1 into a new (fake) position called sidebar-1-conditional. By doing this they won't show up in sidebar-1 until MetaMod includes them.
3 - edit the MetaMod recipe to this:
$vm = JomGenius("virtuemart");
if ( ! $vm->check("pagetype starts with checkout, cart") ) return "sidebar-1-conditional";
4 - ensure the MetaMod is published and assigned to some or all menu items (pages) as appropriate. In this case, probably ALL pages.
That should do it :-)
Re: How to remove sidebar-1 on cart and checkout?
hi thanks for your instructions.
it is now displaying the modules, but all in one div it seems. i played with the settings of the metamod but i did not manage to display it correctly.
how it looks now:
and how it was before and how i want it:
any ideas how to fix this?? or isnt this possible with the free version?
thanks!
Re: How to remove sidebar-1 on cart and checkout?
Hi,
the easiest way to fix it is to go Pro, but depending on your CSS setup on your template it may be possible. The most likely thing to work (if it does work) without going Pro is this:
- in the MetaMod, add a bogus module class suffix e.g. "foo"
- in the MetaMod, set the "Style for included modules" dropdown to the style of module in the module position you are using. If you don't know how to find this out, just try each of the options in turn.
What this does is to sometimes fool the CSS into not realising that the MetaMod is a module, because of the class suffix. This can sometimes then allow the CSS to detect the modules that MetaMod contains to be styled as modules.
If that works - great. Otherwise, going Pro is sure to fix it.
- Index
- » MetaMod
- » MetaMod General Support
- » How to remove sidebar-1 on cart and...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7627
- Newest User:
- rudys68879
- Members Online:
- 0
- Guests Online:
- 177
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked