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
1 vote
Accepted

Is there a way to autoload Forms / Fields in Custom J5 Module?

No, documentation is wrong and this wouldn't make much sense anyways. Joomla\CMS\Form\Form::getInstance() can either retrieve a cached form instance by name or create a new one. But in order to create ...
Sharky's user avatar
  • 11.5k
1 vote
Accepted

How to use component's joomla.asset.json file in module?

You have to use a relative path in your call to addRegistryFile, ie: $wr->addRegistryFile('media/com_foo/joomla.asset.json');
Robbie Jackson's user avatar
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

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