Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] Showing module ONLY in...
[solved] Showing module ONLY in product detail pages
[solved] Showing module ONLY in product detail pages
Hello,
I'm trying to use MetaMod to show a module for a specific product detail page.
I tried using the following code:
$vm = JomGenius("virtuemart"); // need this at the start of every rule
if ($vm->check( "pagetype = productdetails" ) ) {
$product_id = $vm->info( "product_id" );
/* modules that should appear for specific products */
if ($product_id == "16") return 140;
if ($product_id == "18") return 140;
}
My problem is, that the module shows up now on all pages, but I want a module to be shown ONLY for the those specific product detail pages with the product_id's 16 and 18 and not in other pages.
Is there a mistake in my code?
I think that I set up everything else correctly, so I have no idea, what the problem could be..
I'm using the Module for Joomla 2.5 for VM 2.
Thanks in advance!
Christos
29-May-13 21:46:38
Re: [solved] Showing module ONLY in product detail pages
Hi,
ensure:
1 - that the target module (140) is assigned to menu items: none, or is set to a module position that does not exist. Otherwise it will show up on every page regardless of MetaMod.
2 - that you don't have anything in the "quick module id or position include" box. Leave it blank.
3 - that the MetaMod is published and set to a valid module position, and some or all pages (menu items) on your site.
Does that help?
Re: [solved] Showing module ONLY in product detail pages
Hi,
thanks for your quick answer.
The "quick module id or position include" box was not blank so I deleted what I typed in there. First of all thanks for this. The rest was ok.
Now the module is shown only in the defined pages, but there is now a problem with the module's title. The module itself doesn't show up anymore, but the module title still remains on every page.
I tried switching around on/off the titles in both modules, deleting cache, but
no success.
Any idea?
- Index
- » MetaMod
- » MetaMod General Support
- » [solved] Showing module ONLY in...
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:
- 208
- 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