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.

 

How to relate a menu module to a regular menu item?

How to relate a menu module to a regular menu item?

HI,

I have used metamod for a while but i have until now only used it to with virtuemart
and article item ids.

But now i want to use it with regular joomla menu items,  but i have found myself stuck.
I have tried different versions from the receipe section, with no success.

Here is the code i use now, which should in addition to defining what to appear where, also
remove all menues not specified in metamod.


$vm = JomGenius("virtuemart");


if ($content_genius->check("article_id = 79") ) return "184, 164, 167, 166, 169, 171,";

if ($content_genius->check("article_id = 83") ) return "183";

if ($content_genius->check("item_id = 198") ) return "188";


if ($vm->check("pagetype = shop.cart")) return;

if ($vm->check("pagetype = shop.cart")) return 144;


if ($vm->check( "category_id = 1,2,3,4,5,6,16,17,18,19,20,27,25,26,28,29,30" ) ) return "184, 164, 167, 166, 169, 171,";

if ($vm->check( "category_id = 35,36,37,38" ) ) return "185";

if ($vm->check( "category_id = 22,23,24,21,32,33" ) ) return "183";

if ( $vm->check("pagetype = shop.product_details") ) {
  return "164, 167, 166, 169, 176, 171,";
}



To put it simple, i want to link a new menu module i have created to a regular menu id.

I have tried to add this, but didnt work:


if ($content_genius->check("menu_id = 198") ) return "188";


Really appriciate some feedback on this issue.. Cheers

Tormodnor
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: How to relate a menu module to a regular menu item?

Hi Tormodnor,

the one you want it this:

if ($menu_genius->check("Itemid = 198")) return 188;

Only the "menu genius" knows about menu items - see http://www.metamodpro.com/jomgenius/par … menuobject for more details.

Cheers,
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
Offline
3329 Posts
User info in posts
Administrator has disabled public posting

Re: How to relate a menu module to a regular menu item?

Thanks, worked on first try!

Tormodnor
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1698
Total Polls:
6
Total Posts:
5945
Total Posts Today:
1
User Info:
 
Total Users:
5611
Newest User:
idim4
Members Online:
1
Guests Online:
107

Online: 
crooms68989

Forum Legend:

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