for modules and plugins, there are not enough field types to select additional template layers
add field "LayoutsModule" ( /libraries/legacy/form/field/layoutsmodule.php )
add field "LayoutsPlugin" ( /libraries/legacy/form/field/layoutsplugin.php )
for "LayoutsPlugin" add language constant JOPTION_FROM_MODULE="---From Plugin---"
this allows you to create additional template layers in the
[ /modules/mod_mymodule/lauouts/,
/plugins/folder/my_plugin/layouts/ ]
folder and override them in the template
[ /templates/myTemplate/html/layouts/mod_mymodule/,
/templates/myTemplate/html/layouts/plg_folder_myplugin ]
, and – most importantly(!) – select the required override in the extension parameters
Labels |
Added:
?
|
Category | ⇒ | Templates (site) |
There's already a module layout field - https://github.com/joomla/joomla-cms/blob/staging/libraries/legacy/form/field/modulelayout.php - what exactly are you aiming for with this suggested new field?
No, it is not, ModuleLayout selects the main module template, but there are modules with complex templates, when it is necessary to implement additional layers and, if necessary, to override them, to choose the necessary override in the module or plugin
Status | New | ⇒ | Discussion |
So you want to expand the suport of JLayouts to modules and plugins, similar to what we have already for components?
Yep ;)
JLayouts work everywhere as it is. The request is for adding a field type that looks up layouts in /layouts/ directory as opposed to /tmpl/ directory.
That sounds to me like a use case very specific to your extension which you can solve yourself with a custom formfield for that "creative" use of JLayouts.
Status | Discussion | ⇒ | Information Required |
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-06-13 19:21:04 |
Closed_By | ⇒ | AlekVolsk |
https://github.com/AlekVolsk/shits/blob/master/layoutsmodule.php
https://github.com/AlekVolsk/shits/blob/master/layoutsplugin.php