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.

 

[Solved] Adding second page ID to existing meta module

[Solved] Adding second page ID to existing meta module

Maybe i'm doing this the hard way, so plz advise.

I have metamod pro and got it working great anytime I a K2 article shows up, all my modules above the article are hidden.  big_smile
using the following recipe for each module

Code:

if ($option == "com_k2" and $view == "item") return; // return no module if you're on that page

return 101; // replace XXX with module ID to use on all other pages.

Now, if I want to do the same with the registration page for JomSocial, I can't just add to the same code, right?  I have to create another meta module and apply the unique page id to that one?  If there is a better way, please let me know, I don't want to duplicate 12 more modules if its not necessary.

Thanks for a great product,
Chris
fullflexoffroad.com

Edited By: offroadresq
07-Mar-11 08:02:43

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

Re: [Solved] Adding second page ID to existing meta module

Hi Chris,

if the modules are in different module positions, then you need to create at least 1 MetaMod for each module position, and do more or less what you did above.

If all the modules are in the same module position then you can get away with putting everything into one.

For example you could have something like this (untested, but just as an example):

// no modules for k2 item page
if ( $option == "com_k2" and $view == "item" ) return;
// no module for JomSocial registration page
if ( $option == "com_community" and $view == "register" ) return;

return 101; // module for every other type of page.


Get the idea?
Hope that helps,
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: [Solved] Adding second page ID to existing meta module

Perfection!...tested and approved.
Thx

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

Board Info

Board Stats:
 
Total Topics:
1684
Total Polls:
6
Total Posts:
5940
Posts this week:
1
User Info:
 
Total Users:
5162
Newest User:
david30x73
Members Online:
0
Guests Online:
142

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