Skip to main content
3 votes
Accepted

What should I use to escape a module parameter in Joomla 5?

The proposed methods don't work simply because they don't exist. htmlspecialchars() is fine. There is no generic utility method because it would really just be a proxy to htmlspecialchars(). For ...
Sharky's user avatar
  • 11.5k
3 votes

Show 'menuitem' field name in frontend of module

You can use the following: $menu = Joomla\CMS\Factory::getApplication()->getMenu(); $menuItem = $menu->getItem($menulink); echo $menuItem->title; If you var_dump($menuItem);, it will show ...
Lodder's user avatar
  • 26.9k
3 votes
Accepted

Creating a module and giving it config parameters options

Welcome to JSE. I'm not sure which documentation you've been referring to, however the Joomla Docs show you how to add parameters to your module: https://docs.joomla.org/J3.x:...
Lodder's user avatar
  • 26.9k
3 votes
Accepted

Module Template/alternate layout Name language Override

The layout language key is built like this: $key = strtoupper($module . '_LAYOUT_' . $value); Where $module is the module name (including mod_ prefix) and $value is the layout name. Example string ...
Sharky's user avatar
  • 11.5k
3 votes

How to change form values sent by a module?

If you're talking about module definition file that holds module options you can't do much in the file using framework it-self. But you can do it in 3 other ways. In the UI by Java Script Just create ...
Artur Stępień's user avatar
3 votes
Accepted

Custom field colResizable plugin not working but works in fiddle

You are calling the colResizable jQuery plugin before the jQuery itself. It should be the other way round. Also, Joomla's admin should also already have jQuery loaded, but that uses jQuery v1.12.4. ...
RichardB's user avatar
  • 3,082
2 votes

Custom field colResizable plugin not working but works in fiddle

How about to change the $ sign with jQuery? So the code would be jQuery("#tableResizable").colResizable({ fixed:true, liveDrag:true, gripInnerHtml:"<div class='grip'>&...
webchun's user avatar
  • 2,418
2 votes
Accepted

Move the Joomla! module layout override to a different tab

I am losing you a little bit in your question. Saying move the Joomla module layout override option, do you mean to display that field within another tab? If so, what's the problem you are facing ...
FFrewin's user avatar
  • 19.7k
2 votes

XML file does not upload with my custom module

The manifest (main xml) is the only file that doesn't need to be included in the manifest (ie itself). Other xml files need to be listed either as files or be in listed folders. One attribute in the ...
jamesgarrett's user avatar
  • 3,299
2 votes
Accepted

Joomla 3 - How to set module params programmatically?

Yes you can save the params of the module programmatically by taking the instance of the extension table 1: JTable update $table = JTable::getInstance('extension'); $table->load($moduleId); $...
Pratyush's user avatar
  • 496
2 votes

Can't pass params to external php file

By looking at updated xml file, I see only one issue that you haven't used <fields name="params"></fields> in config tag and hence your modparams object showing blank. Try below xml ...
Sudhir Sapkal's user avatar
2 votes
Accepted

<customContent /> or <field type="editor">

Well, I've just had my first case when using one or the other seems relevant. In the database, Joomla's fields for both the "params" and the "content" fields of modules are of the type TEXT, which ...
RichardB's user avatar
  • 3,082
2 votes

<customContent /> or <field type="editor">

I've tried doing some research on this of my own as I was interested to see what purpose it served. Looking through some Github issues, it has been noted that customContent is valid, however ...
Lodder's user avatar
  • 26.9k
2 votes
Accepted

subform inside subform in module

Access the link fields the same way you're accessing other fields, through the main activities field. <?php foreach ((array) $activities as $activity) : ?> <?php foreach ((array) $...
Sharky's user avatar
  • 11.5k
2 votes
Accepted

Joomla 4 - Module Backend Subform subform-row-add "row" not available

The way the event is invoked is slightly different for Joomla 4. You can use the following: $(document).on('subform-row-add', function(event) { console.log(event.detail.row); }); Or native ES6+ ...
Lodder's user avatar
  • 26.9k
2 votes

Can a module used in an article have parameters?

No, it is not possible. Parameters are defined in the module instance with the given ID. You'd need a custom shortcode plugin to pass any parameters.
Sharky's user avatar
  • 11.5k
2 votes

Use different module settings/parameters on different posts in Joomla!

Joomla's design allows you to have multiple instances of modules to allow you to undertake what you've explained you're trying to do. Basic Implementation The assignments tab in the module settings ...
Patrick Jackson's user avatar
2 votes
Accepted

ModuleHelper::renderModule with custom parameters

Attributes aren't meant to be used inside module context and they're no longer passed there. They're now only available in module chromes. Short of stuffing properties into $module object there isn't ...
Sharky's user avatar
  • 11.5k
1 vote
Accepted

Giving parameters to my module on the administrator side

In the manifest file, mod_yourmodule.xml, for your module you specify the <config> element and put the details of the field(s) that you want to store the details of your pdf archives. <config&...
Irata's user avatar
  • 4,001
1 vote
Accepted

Copying module, using the translation strings from the copied module

If I understand your question correctly you are copying mod_articles_news to create a new module called 'mod_my_new_module and in the mod_my_new_module.xml you leave the <languages> settings the ...
Irata's user avatar
  • 4,001
1 vote
Accepted

Can a module used in an article have parameters?

You might prefer to use a custom field for this. It would make it more user friendly for authors. Should you want to do this here's a free field developed by Elisa Foltyn. https://github.com/coolcat-...
Eoin's user avatar
  • 1,976
1 vote

J4 Get an array of parameters from template/module

I would use field groups instead of prefixes to organize fields in the form. This way no additional code is needed: <fields name="params"> <fields name="logo"> ...
Sharky's user avatar
  • 11.5k
1 vote
Accepted

Show article details from custom module

As far as I know, the SQL form field will always return the ID of an article. So you can get the title, into text and intro image, you can use Joomla's Table class: use Joomla\CMS\Table\Table; $...
Lodder's user avatar
  • 26.9k
1 vote
Accepted

Get module params in custom form field

Get the value from current form. $bgcolor = $this->form->getField('bgcolor', 'params')->value;
Sharky's user avatar
  • 11.5k
1 vote
Accepted

Child XML for joomla parameters

It's now possible with the Sub Form field function introduced in Joomla 3.6
webchun's user avatar
  • 2,418
1 vote

Module field type category not working

Joomshopping may have categories for the products, but it does not the Joomla core categories table/model for its categories. It has its own. The categories field is for the Joomla core categories, ...
FFrewin's user avatar
  • 19.7k
1 vote

How to add article links to module mod_articles_category?

Create an override for the module in templates/your_template/html/mod_articles_category/default.php Add to the line 20 and 84 after li tag: <?php $params = $item->params; $urls = ...
Dennis Heiden's user avatar
1 vote
Accepted

Joomla 3.6 nested subforms not saving

So far this is not yet possible to do in Joomla. Nested subforms or in other words multi level subforms is on the agenda. It's just hoping a good volunteer is ready to tacke this issue. More info can ...
purple11111's user avatar
1 vote
Accepted

use Joomla Subform field values in custom field from same module

I solved this doing it a bit different. B is done via this code which grabs all the inputs and converts them to a select box. Then when the user makes a selection it copies that selection to a normal ...
purple11111's user avatar
1 vote
Accepted

How to connect to DB in module's admin panel

For this, you can go with a custom form field type In your form field, you can interact the way you want with the database and have your results printed in the module's admin panel. Perhaps you ...
FFrewin's user avatar
  • 19.7k

Only top scored, non community-wiki answers of a minimum length are eligible