?
avatar AlekVolsk
AlekVolsk
11 Jun 2018

Is your feature request related to a problem? Please describe.

for modules and plugins, there are not enough field types to select additional template layers

Describe the solution you'd like

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---"

Additional context

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

avatar AlekVolsk AlekVolsk - open - 11 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 11 Jun 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Jun 2018
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Jun 2018
Category Templates (site)
avatar mbabker
mbabker - comment - 11 Jun 2018

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?

avatar AlekVolsk
AlekVolsk - comment - 11 Jun 2018

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

avatar AlekVolsk
AlekVolsk - comment - 11 Jun 2018

For example, a module with a filter form, where each filter element is a separate layer, and layers of the same type sometimes need to be wrapped in a different way (for example, a list can be represented as a select, multi-select, regular list, group of checkboxes or radio, in any other way)

screenshot_1

avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Jun 2018
Status New Discussion
avatar laoneo
laoneo - comment - 12 Jun 2018

So you want to expand the suport of JLayouts to modules and plugins, similar to what we have already for components?

avatar AlekVolsk
AlekVolsk - comment - 12 Jun 2018

Yep ;)

avatar SharkyKZ
SharkyKZ - comment - 12 Jun 2018

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.

avatar Bakual
Bakual - comment - 12 Jun 2018

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.

avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Jun 2018
Status Discussion Information Required
avatar AlekVolsk AlekVolsk - change - 13 Jun 2018
Status Information Required Closed
Closed_Date 0000-00-00 00:00:00 2018-06-13 19:21:04
Closed_By AlekVolsk
avatar AlekVolsk AlekVolsk - close - 13 Jun 2018

Add a Comment

Login with GitHub to post a comment