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.

 

Sobi2 puzzle

Sobi2 puzzle

I have looked through several threads over two nights trying to work out how to hide modules from appearing from sobi2 items. And yes I saw this page with a whole lot of examples of what appears to be how to get modules to publish according to cats and ids..etc.

http://www.metamodpro.com/metamod/recip … obi2-pages

BTW that page gets cut off in FF. see my attached image, cant read all the writing. (sorry cant work out how to attach an image...i must be an idiot..)

But for the life of me I cant get my head around how to exclude modules from all sobi pages. Once I can do that I can slowly rebuild them with some metamod modules i guess....seems a roundabout way to build a site but oh well, sobi2 has given me plenty of headaches before today..

I tried this too
if ( $option == "com_sobi2"
  and JRequest::getVar('catid') == ''
  and JRequest::getVar('sobi2Task') == ''
) return "214";

and took out the 214 and still didnt see anything different.

Im heading for the fridge..., i need a drink...  sad

cheers

Krazza
Beginner Modder
ranks
useravatar
Offline
1 Posts
Administrator has disabled public posting

Re: Sobi2 puzzle

Hi Krazza,

You may already be doing this, but the first thing you need to understand when wanting to exclude modules using MetaMod is that MetaMod can't (*) actually exclude modules - all it can do is selectively include them. So you have to start with the modules not showing, then use MetaMod to only include them if certain conditions are met.

(*) not entirely true - with MetaMod Pro you can actually unpublish modules anywhere on the page, using the techniques in http://www.metamodpro.com/metamod/contr … arameters. But that's another story.

Anyway, what this means is that if you want to exclude the modules from certain or all SOBI2 pages, then you first have to make sure the modules are not showing on the page(s). This can be done either by:
- unpublish them
- or set the modules to display on "none" pages with the menu assignment selector
- or change the module position that the module is assigned to, to one that doesn't actually exist on the pages in question.

I like the last technique. I tend to assign all my "target" modules to a position like "left-metamod" (if they are going to get displayed in the "left" position) and keep them published.

Once that's done, then I create the MetaMod and assign it into the "left" position, and use the PHP to selective include the modules on all pages except the ones I wanted to exclude.

e.g.

if ( $option != 'com_sobi2' ) return 214;

(if the option is not equal to com_sobi2, then include module 214)

You can even use this technique to include ALL modules from the "left-metamod" quasi-position:

if ( $option != 'com_sobi2' ) return "left-metamod";

That way it's really easy to change which modules are going to get included or excluded by the rule, without editing the rule. Just assign different modules to the left-metamod position.

I hope that gets you started. Once you've excluded all modules from SOBI2 pages then you might want to include them on just selected pages - write back if you have any troubles with the PHP for that.

Best regards,
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
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4386
Newest User:
verlywl7
Members Online:
1
Guests Online:
562

Online: 
verlywl7

Forum Legend:

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