User tests: Successful: Unsuccessful:
We have nice #__extensions.custom_data MEDIUMTEXT column to store custom extension data, but it's not available in Joomla get extension methods.
Example: currently, if a template stores any own data in #__extensions.custom_data, it can be only retrieved via separate SQL query.
It would be nice to be able to have access to custom_data via native $app->getTemplate(true)
I.e. YooTheme will be able to use this workaround to reduce extra SQL query per page load.
Same for components, menus and modules.
Install patch.
You can't get custom_data via $app->getTemplate(true) and other extension get methods:
var_dump(\Joomla\CMS\Component\ComponentHelper::getComponent('com_content'));
var_dump(\Joomla\CMS\Plugin\PluginHelper::getPlugin('authentication', 'joomla'));
var_dump(\Joomla\CMS\Helper\ModuleHelper::getModule('mod_menu'));
var_dump(\Joomla\CMS\Factory::getApplication()->getTemplate(true));You can get custom_data in all methods above.
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_templates |
| Labels |
Added:
PR-6.1-dev
|
||
| Category | Administration com_templates | ⇒ | Administration com_templates Libraries |
| Title |
|
||||||
@HLeithner I've updated the description and code to have custom_data for components, menus and modules consistently.
thanks, now we need some testers.
at least not in this pr, I think.
I did a quick look and it isn't loaded anywhere in the core, for example the ComponentHelper also doesn't load it. So I'm not so sure if it should be added at all. it's a field only for 3rd party extensions (based on the relevant github pr and issue) which also means it's in your space to use it as you need it.
If we load it we should be consistent and make it available in all get functions.