? ?
avatar shoulders
shoulders
5 Feb 2020

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

There is no layout field for plugins in the standard field types.
https://docs.joomla.org/Standard_form_field_types

Describe the solution you'd like

What I would like to see is a Plugin Layout field added. This would allow me to select a layout like i can in components and modules.
image

Additional context

Why would i want this?

  • Parity with components and modules. Both Components and Modules have a layout field which is useful.
  • There are times this can be useful. The most basic example is that your plugin replaces a shortcode with some content.
    • If I can select a layout, I can chooses to either have a dark or light theme
    • A user can choose what content to display in place of the shortcode

I have emulated this field using the filelist filed.

<field 
    name="layout"
    type="filelist"					
    default="default.php"
    label="PLG_CONTENT_HELLOWORLD_LAYOUT_LABEL"
    description="PLG_CONTENT_HELLOWORLD_LAYOUT_DESC"
    directory="plugins/content/helloworld/tmpl"
    filter=""
    exclude="\.html$"
    stripext="1"
    hide_none="1"
    hide_default="0"
/>
avatar shoulders shoulders - open - 5 Feb 2020
avatar joomla-cms-bot joomla-cms-bot - change - 5 Feb 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Feb 2020
avatar jwaisner jwaisner - change - 15 Feb 2020
Priority Medium Very low
avatar jwaisner jwaisner - change - 15 Feb 2020
Category Feature Request
avatar SharkyKZ SharkyKZ - change - 9 May 2020
Labels Added: ?
avatar SharkyKZ SharkyKZ - labeled - 9 May 2020
avatar rdeutz rdeutz - change - 18 Dec 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-12-18 10:30:59
Closed_By rdeutz
avatar rdeutz rdeutz - close - 18 Dec 2020

Add a Comment

Login with GitHub to post a comment