Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding <jdoc:include calls in Component Templates

Tags:

joomla

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 modules 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

like image 829
Sebastian Roth Avatar asked May 24 '26 12:05

Sebastian Roth


1 Answers

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..

like image 194
Sebastian Roth Avatar answered May 26 '26 19:05

Sebastian Roth



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!