New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.1] Parameters for Module Chromes #23577
Conversation
@ciar4n mentioned in #23570 (comment) the fact that the way it is done here means template devs need to play nice. The showon would be essential and I also think the prefixed field name. There are some other thoughts which are needed here. Some that come to mind:
|
Tricky. I guess this means that to show the parameters, a user has to select the chrome from the list, even thou the selected chrome is the same as the inherited. Seems incorrect but not sure how to work around it. |
Yep, I have the same feeling. Imho we can either show all possible parameters, only the default ones or none. We have no way of knowing which is the inherited style, and it may even change when the active template changes. |
Personally, I would lean towards displaying none. Assuming that can be enforced and the template dev can't override it by simply not setting the 'showon'. |
@Bakual Any interest in picking this up and fixing the conflicts? |
Yep, definitively interested, but certainly not in the comins week or two. Maybe later I can fix it, |
Fixed the conflicts (they were coming from the now merged other PR). Adjusted the PR description. |
I have tested this item ✅ successfully on 67d4641 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23577. |
I have tested this item ✅ successfully on 67d4641 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23577. |
@Bakual can you merge the current 4.1-dev into it and change the target branch because this is a new feature and it's too late for j4.0. |
PR is rebased on 4.1-dev now. Code has not changed. |
Skip template if chrome folder doesn't exist
Removed the use of JForm in favor of Form 😄 |
I like this feature, and it works as described. At least move the field module style at the end, so it is together with newly pluggend in params? @Bakual |
That's a good idea. I moved the style parameter to the end so it's next to the chrome parameters. |
Co-authored-by: Richard Fath <richard67@users.noreply.github.com>
I have tested this item ✅ successfully on 7171044 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23577. |
I have tested this item ✅ successfully on 7171044 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23577. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23577. |
Thx |
@Bakual I just noticed that language strings is the params.xml are not working. In your example you use hard coded language strings. It would be nice if language strings can be added so the parameters become Multilingual. Maybe add a new PR. Ping me if you need someone to test 😉 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23577. |
Language strings work. I actually just used the feature this week. Did you put the language strings into the templates |
@Bakual Looks like I added the translations to the other file without the sys. Thanks for the tip! |
This isn't ready to be used yet as it needs some discussion first.
Summary of Changes
All it does is looking in the chrome jlayout folders for XML files and loading them into the module edit form.
Testing Instructions
Create an XML in a chrome folder and put some fields into it. As an example create the file
templates/cassiopeia/html/layouts/chromes/params.xml
and put the following content into it:Expected result
The defined parameter should be available in the module edit form.
Since the example has a
showon
defined, it will only show up if you have selected the module style "card" from Cassiopeia.Documentation Changes Required
Obviously.