Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Hide modules in virtuemart
Hide modules in virtuemart
Hide modules in virtuemart
I have some modules that i want to hide specificially in virtuemart category how can i do that ?
Example i have a menu that i have created for homepage only but it is again here in Virtuemart, it's crazy i have just installed Metamod wich is super but i don't understand how to use it for that job ?
Can you give me a resume clear of what doing ?
Thanks a lot.
Re: Hide modules in virtuemart
Hi MrJulien,
This is an overview of what we want to achieve:
1 - stop the module appearing in the normal Joomla way (e.g. set it to "disabled")
2 - set up a MetaMod in the module position that the original module is supposed to appear in
3 - set a rule in MetaMod that includes the original module, but NOT when it's in the specific VM category that you mentioned.
Clear?
Ok, so some rules you examine and modify can be found on the VM recipe page:
http://www.metamodpro.com/support/recip … mart-pages
I'd suggest something like this:
Code:
if ($option == "com_virtuemart") {
$category_id = JRequest::getVar("category_id");
$category = JRequest::getVar("category", null);
$page = JRequest::getVar("page");
// on shop browse page, BAN a specific category (55 in this case)
if ($page == "shop.browse" and $category_id == "55") {
return; // i.e. return NO module, if on the browse page and on category 55
}
else return 101; // replace 101 with the module id you want to display on all other VM pages
}
Hope this does the job,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Hide modules in virtuemart
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7643
- Newest User:
- ulmer60661
- Members Online:
- 1
- Guests Online:
- 125
- Online:
- ulmer60661
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked