-
AuthorPosts
-
April 2, 2013 at 8:26 am #186379
I’m helping a client who is using MetaMod Pro with a JAT3 template. We’re having some trouble.
In Joomla 2.5 when not using a JAT3 template, modules can retrieve the content of the “component” buffer. This can be useful for example to parse the contents of that, and use that to trigger some behaviour in the module if the component produced certain output. e.g. it can trigger a certain selection of images depending on the content of the page.
Normally in Joomla a module can retrieve the component content this way:
[PHP] $document = JFactory::getDocument();
$buffer = $document->getBuffer();
$content = $buffer[‘component’][”];[/PHP]
Now, when a JAT3 template is used with MetaMod Pro (Pro version only), that code returns an empty string – not good.MetaMod Pro works a little differently to normal module rendering, because it uses the same replacement Module Helper class that JAT3 does. The MetaMod modules are rendered in a plugin in the _load() method in the helper class, meaning they get rendered at an earlier point than modules usually do. Normally this is not a problem. I guess that in normal Joomla, the _load() method, via the getModules() method, is only called after the main component is rendered. But this is not the case with the JAT3 framework, and I think it’s happening earlier, perhaps before the component is rendered.
Here’s part of the stack backtrace:
#8 JModuleHelper::_load() called at [/Library/WebServer/Documents/j258/plugins/system/metamodpro/overloaded/modulehelper.php:105]
#9 JModuleHelper::getModules(position-7) called at [/Library/WebServer/Documents/j258/libraries/joomla/document/html/html.php:464]
#10 JDocumentHTML->countModules(position-7) called at [/Library/WebServer/Documents/j258/plugins/system/jat3/jat3/core/template.php:1207]
#11 T3Template->countModules(position-7, 1) called at [/Library/WebServer/Documents/j258/plugins/system/jat3/jat3/core/template.php:704]
#12 T3Template->hasBlock(left1) called at [/Library/WebServer/Documents/j258/plugins/system/jat3/jat3/core/template.php:1059]
#13 T3Template->parseLayout() called at [/Library/WebServer/Documents/j258/plugins/system/jat3/jat3/core/template.php:721]
#14 T3Template->loadLayout() called at [/Library/WebServer/Documents/j258/plugins/system/jat3/jat3/core/framework.php:151]
#15 T3Framework::init_layout() called at [/Library/WebServer/Documents/j258/plugins/system/jat3/jat3.php:274]
#16 plgSystemJAT3->onAfterRoute()So it appears that the _load() is done basically within the onAfterRoute trigger, which means that it’s rendered very early, before the component is rendered.
Can anyone from the JAT3 team offer any advice on how a module that is being rendered during this trigger could have access to the rendered component? Could it force the component to render early in some way? Any other techniques?
Many thanks for any help,
Stephen Brandon
MetaMod Developer
metamodpro.comSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
June 19, 2013 at 2:22 am #496220Hi Stephen,
I’ve never used this MetaMod ext before, you can pm me url, admin / ftp account of your site or send me package of this module, I will check in my local to see what’s going on.
This thread was missed to replied and I’m sorry for the same
Regards
-
AuthorPosts
This topic contains 2 replies, has 2 voices, and was last updated by Saguaros 11 years, 5 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum