User tests: Successful: Unsuccessful:
Right now if you want to include some custom fields in your module you need to include a custom field path in the relative xml file, something like:
<fieldset addfieldpath="/modules/<module name>/field">
Documented here: https://docs.joomla.org/Creating_a_custom_form_field_type
This PR leverages this, so custom fields will happily reside inside a folder named field
Why field and not fields?
Singular word help us transition to autoload and namespace
Apply this patch with patch tester
edit modules/mod_custom/mod_custom.xml
and paste after line 27
<field name="testone" class="" type="testone" default="0"
label="test one"
description="test one" />
Create a folder named field
inside modules/mod_custom/
copy testone.php to the folder you just created from https://gist.github.com/dgt41/ec0e2afe879c5d07ffadd2c8a639e1a7
Add a new Custom module and check the options tab:
If you see a dropdown you have success
No backwards compatibility break
We just add one more folder check to the whole stack, so performance degradation should be unnoticeable. (Joomla itself does that hundreds of times for core libraries)
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Fields Modules |
I have tested this item successfully on d8ecbc6
Thanks
Status | Pending | ⇒ | Ready to Commit |
RTC - leaving it to the maintainers to decide the milestone
Labels |
Added:
?
|
Milestone |
Added: |
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-04-09 13:55:55 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
Please update the documentation. Thanks.
I will!
I have tested this item successfully on d8ecbc6
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9797.