Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Display a certain module only one browse page

Display a certain module only one browse page

Hi metamodguy,
(sorry if the subject already solved)
Please help with basic user guide for lama
Joomla: 1.5.22
VM:1.1.9
MetaMod:v2.12

I’ve followed, your quickstart and recipes of the control module, but still having problem displaying certain module in selected category browser page.
In this case let’s say I want to show the poll module (ID:16) in browser page of the „Fishes” category(ID:69) in left-top position.

mod metamod:
Enabled:yes
Position:left-top
Menu Assignment: none

Quick module position or id include: leaved in blank
PHP:

Code:

$vm = JomGenius("virtuemart"); 

if ( $vm->check("pagetype = shop.browse") ) {
  $category_id = 69 return 16;

mod_poll
((Position: left-top))(If I understood correctly not important, just in if I specify the custom module e.g.:right-metamod  )
Enabled:yes
Menu Assignment:none

The module not appears.
I also tried with several variation of code parameters,

Code:

$vm = JomGenius("virtuemart"); 

if ($vm->check("category_id = 69")) return 16;

but no luck.

Probably I need something like this???:

Code:

$vm = JomGenius("virtuemart"); // need this at the start of every rule

if ( $vm->check("pagetype = shop.browse") ) {
  $category_id = 69;
  /* when browsing a specific category on browse page (e.g. category 2) */

  /* when browsing any other category on browse page */
  return 16;

Please check out my setup, am I missed something, or totaly confused.
Thanks in advance

nehogymar
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: Display a certain module only one browse page

Hi nehogymar,

the first thing that I notice is that the MetaMod is set to "none" menu items. You have to set it to display on some (or all) menu items. Otherwise, the code in the MetaMod never gets run, and nothing will display.

Next, there's the PHP code. I think this is what you meant:

$vm = JomGenius("virtuemart");
if ( $vm->check("pagetype = shop.browse")
   and $vm->check( "category_id = 69" ) ) return 16;

I'm pretty sure that will work now :-)

Best regards, and Christmas greetings,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Online
3328 Posts
User info in posts
Administrator has disabled public posting

Re: Display a certain module only one browse page

Thanks Stephen,

Of course with this setup the module working perfectly!
I wish you a Happy New Year 2012

nehogymar
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
4
User Info:
 
Total Users:
4384
Newest User:
rash39381
Members Online:
1
Guests Online:
142

Online: 
metamodguy

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked