User tests: Successful: Unsuccessful:
Pull Request resolves # .
I added the ability to add custom options to the ChromestyleField.
<field
name="item_style"
type="chromestyle"
label="Style Module"
>
<option value="">JOPTION_DO_NOT_USE</option>
</field><field
name="item_style"
type="chromestyle"
label="Style Module"
>
<option value="">JOPTION_DO_NOT_USE</option>
<option value="userOption">User Oprtion</option>
</field>Style Module”.Previously, custom options were not used.
Now, user options will be added to the existing standard options of the module.
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Libraries |
| Title |
|
||||||
| Labels |
Added:
PR-6.2-dev
|
||
| Labels |
Added:
Feature
|
||
What is the use case for this change. How exactly would this change be used - when and where
I used it to create a container module to place other modules in it.
This allows you to flexibly create a grid of modules in a template.,
For example, in one module position, I create 2 sub-positions for modules, in the first I place the menu, bread crumbs, in the other sub-position I place a list of news and a banner with animation.
This allows you to go beyond the standard templates that are limited by the number of positions.
"""" My container module contains a "chromestyle" parameter in its settings, allowing you to select the selected "chromestyle" for nested modules or use their default "chromestyle".
What is the use case for this change. How exactly would this change be used - when and where
I used it to create a container module to place other modules in it.
This allows you to flexibly create a grid of modules in a template.,
For example, in one module position, I create 2 sub-positions for modules, in the first I place the menu, bread crumbs, in the other sub-position I place a list of news and a banner with animation.
This allows you to go beyond the standard templates that are limited by the number of positions.
My container module contains a "chromestyle" parameter in its settings, allowing you to select the selected "chromestyle" for nested modules or use their default "chromestyle".
I have tested this item 🔴 unsuccessfully on 77e800b
When using the code from the test instructions it creates a new field instead of extending the exiting one.
When I rename it to "style" it replaces the existing one but the user Option is not added
I have tested this item 🔴 unsuccessfully on 77e800b
When using the code from the test instructions it creates a new field instead of extending the exiting one.
When I rename it to "style" it replaces the existing one but the user Option is not added
<field
name="abra"
type="chromestyle"
label="Style Chrome"
clientid="0"
>
<option value="userOption">User OPTION</option>
<option value="">JOPTION_DO_NOT_USE</option>
<option value="Admin123">ADMIN 321</option>
</field>I just checked it out. Everything is working.
I used a different name for this field.
And then in the module layout I got access to the value
in modules/mod_menu/tmpl/default.php
echo "<pre>". $params->get('abra', '')."</pre>";Maybe you used the name of the style field, and therefore CMS checks for the file by value, in case of its absence it uses the default value of this field.
But I used a different name, it works.
Using this type of field with other names also makes sense for other tasks.
It doesn't make sense to use this field in a normal situation with the original name style. It makes sense to create a custom component inside which modules will be located, in which special module styles can be used.
With special additional values.
<field
name="style_In_Component"
type="chromestyle"
label="Style Module"
>
<option value="">JOPTION_DO_NOT_USE</option>
<option value="parent">Parent</option>
<option value="default">Default</option>
<option value="carausel">Carausel</option>
<option value="tabs">Tabs</option>
<option value="accardeon">Accardeon</option>
</field> <field
name="abra"
type="chromestyle"
label="Style Chrome"
clientid="0"
>
<option value="userOption">User OPTION</option>
<option value="">JOPTION_DO_NOT_USE</option>
<option value="Admin123">ADMIN 321</option>
</field>I just checked it out. Everything is working.
I used a different name for this field.
And then in the module layout I got access to the value
in modules/mod_menu/tmpl/default.php
echo "<pre>". $params->get('abra', '')."</pre>";Maybe you used the name of the style field, and therefore CMS checks for the file by value, in case of its absence it uses the default value of this field.
But I used a different name, it works.
Using this type of field with other names also makes sense for other tasks.
It doesn't make sense to use this field in a normal situation with the original name style. It makes sense to create a custom component inside which modules will be located, in which special module styles can be used.
With special additional values.
<field
name="style_In_Component"
type="chromestyle"
label="Style Module"
>
<option value="">JOPTION_DO_NOT_USE</option>
<option value="parent">Parent</option>
<option value="default">Default</option>
<option value="carausel">Carausel</option>
<option value="tabs">Tabs</option>
<option value="accardeon">Accardeon</option>
</field> <field
name="abra"
type="chromestyle"
label="Style Chrome"
clientid="0"
>
<option value="userOption">User OPTION</option>
<option value="">JOPTION_DO_NOT_USE</option>
<option value="Admin123">ADMIN 321</option>
</field>I just checked it out. Everything is working.
I used a different name for this field.
And then in the module layout I got access to the value
in modules/mod_menu/tmpl/default.php
echo "<pre>". $params->get('abra', '')."</pre>";Maybe you used the name of the style field, and therefore CMS checks for the file by value, in case of its absence it uses the default value of this field.
But I used a different name, it works.
Using this type of field with other names also makes sense for other tasks.
It doesn't make sense to use this field in a normal situation with the original name style. It makes sense to create a custom component inside which modules will be located, in which special module styles can be used.
With special additional values.
<field
name="style_In_Component"
type="chromestyle"
label="Style Module"
>
<option value="">JOPTION_DO_NOT_USE</option>
<option value="parent">Parent</option>
<option value="default">Default</option>
<option value="carausel">Carausel</option>
<option value="slides">Slides</option>
<option value="tabs">Tabs</option>
<option value="accardeon">Accardeon</option>
</field>This pull request has been automatically rebased to 6.3-dev. Joomla! 6.2 is now in feature freeze.
| Title |
|
||||||
What is the use case for this change. How exactly would this change be used - when and where