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 on ALL VirtueMart pages,...
Hide Modules on ALL VirtueMart pages, but otherwise...
Hide Modules on ALL VirtueMart pages, but otherwise...
So, I am sure I am missing something obvious and I will apologize in advance for this...
I am using Joomla 1.5.26 with VirtueMart 1.1.9 and MetaMod 2.12.
All I want to do is to prevent certain modules from appearing anywhere in VirtueMart. Otherwise, I want the normal module display parameters to work as usual (as controlled in the module manager).
For example, I put in this "rule" since I do not use the "VirtueMart FrontPage" I figured that it would eliminate display of the modules by default...:
$vm = JomGenius("virtuemart");
if ( $vm->check( "pagetype = frontpage" ) ) return 115;
if ( $vm->check( "pagetype = frontpage" ) ) return 119;
if ( $vm->check( "pagetype = frontpage" ) ) return 56;
but it only seems to stop module 56 from being displayed--and even then it is not consistent. For example, module 56 displays on category pages, but not product details pages.
Thanks in advance... I've been reading this forum for over an hour and I need to get this done...
21-Nov-12 15:12:12
Re: Hide Modules on ALL VirtueMart pages, but otherwise...
Hi izrunas,
I would just do the following, which detects all VM pages, and shows the module on everything else:
if ($option != 'com_virtuemart') return 56;
This will show module 56 on all pages that the MetaMod is assigned to [that's an important distinction] *except* any pages based on the VirtueMart component.
Now, if you have several different modules all in the same module position that you want to hide/show, you can include them all like this:
if ($option != 'com_virtuemart') return "56, 115, 119";
Or, if the 3 modules you want to control are all in different module positions, then you need to put a MetaMod into each of the module positions, and control each module with a separate MetaMod. Make sense?
Best regards,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Hide Modules on ALL VirtueMart pages,...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7630
- Newest User:
- welch84998
- Members Online:
- 0
- Guests Online:
- 119
- 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