Adding <jdoc:include calls in Component Templates
I'm integrating a component template for a customer. He is using custom templates for com_user / login & reset views.
His site is also using a lot of modules. How can I activate these module开发者_StackOverflow社区s for the component in total, instead of a menu item?
In the module template (user/login/tmpl/default.php
) I wrote: <jdoc:include type="modules" name="ja-news" />
, which doesn't work.
Thanks for any answers!
BR, Sebastian
Found the solution in http://forum.joomla.org/viewtopic.php?f=231&t=247191
<?php
$zone = "ja-news";
$modules =& JModuleHelper::getModules($zone);
foreach ($modules as $module){
echo JModuleHelper::renderModule($module);
}
?>
I guess it would be good to have <jdoc:include
with an additional force="true" parameter..
精彩评论