Adding <jdoc: incorporating calls into component templates

I integrate the component template for the client. It uses custom templates for com_user / login and reset views.

His site also uses many modules. How can I activate these modules for the whole component, and not the menu item?

In the module template ( user/login/tmpl/default.php), I wrote: <jdoc:include type="modules" name="ja-news" />which does not work.

Thanks for any answers!

BR, Sebastian

+3
source share
1 answer

Found a solution at 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 think it would be nice to have <jdoc:includewith an additional parameter force = "true" ..

+4
source

Source: https://habr.com/ru/post/1773584/


All Articles