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.

 

Apply changes to nested module

Apply changes to nested module

Hello!
I have a SobiPro module inside a Custom HTML module. Custom HTML module is inserted in Joomla page using Modules Anywhere. I would like to control some parameters of the SobiPro module but nothing happens. I set up a Metamod Pro module in any position just with some code and assigned to menu where I need to change target nested module:

$changes->mod(267)
  ->showTitle(true);

But it seems that doesn't work.

Thank you!

MrWilly
Beginner Modder
ranks
useravatar
Offline
3 Posts
Administrator has disabled public posting

Re: Apply changes to nested module

Hi MrWilly,

I've just looked at the source of Modules Anywhere to see how it displays modules. What I see is that when it includes a module, it gets the info direct from the database therefore bypassing the module parameter changes that MetaMod would apply.

Therefore I am sorry to say that module parameter changes done in this way (module A includes a tag to trigger Modules Anywhere to include module B in module A's output) mean that MetaMod Pro is not able to make changes to parameters in module B.

An alternative would be the following:

Instead of using M.A., you could replace module A (custom HTML) with a MetaMod that uses PHP to "echo" raw HTML to its output. The MetaMod can then "return 267;" in order to place module 267 AFTER the custom HTML output. And you can then use the $changes mechanism as well. The only downside I can see is that module 267 can only appear after the echoed HTML output.

e.g.

echo "<h3>a heading here</h3>";
echo "<p>and now for the SOBI module:</p>";
$changes->mod(267)
  ->showTitle(true);
return 267;

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
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:
4421
Newest User:
rajajudi14
Members Online:
0
Guests Online:
101

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