New answers tagged

2

To use J4 style or custom naming conventions with AJAX you have to convert the module to new service-based format. At a minimum, service provider (services/provider.php) needs to provide a module extension, a dispatcher factory and a helper factory: defined('_JEXEC') or exit; use Joomla\CMS\Extension\Service\Provider\HelperFactory; use Joomla\CMS\Extension\...


1

I had two extra minutes to test this according to my previous comments under your question. I created a helper.php inside the ArticlesLatest Module (root of that module) and created a class: class ModArticlesLatestHelper This looks simply: <?php /** * @package Joomla.Site * @subpackage mod_articles_latest * * @copyright (C) 2006 Open Source ...


1

Components aren't really meant to be rendered more than once per request. Your best bet would be to make separate requests. Wrapper component and module can be used to display the page using an iframe. Or you can retrieve the page in PHP using HTTP library. There is Components Anywhere plugin which uses this method https://extensions.joomla.org/extension/...


-1

This solution helped me to pass xml field data to class in helper.php. public static function xyz(){ $module = JModuleHelper::getModule('mod_name'); $params = new JRegistry(); $params->loadString($module->params); $xyz = $params->get('xyz'); return $xyz; } mod_name -> this is the module name. Please replace this. $params->...


Top 50 recent answers are included