Affects Version/s: None
Fix Version/s: 2.1.0
Sprint:[2.1] Sprint 3
Add to the custom tags configuration elements to define the tag's attributes at backend level. Those will be used to generate the editing UI for a custom tag in the OE.
Any number of attribute can be added to a custom tag:
They are made available in the tag template in the params variable.
The custom tag configuration must be added support for the following:
Initial supported types:
The types system should be open enough so that:
- custom types can be defined, including their editing interface and how they're serialized
- in a later iteration, fieldtypes can be used as attributes types (this needs to be better explored in a spike)
An attribute needs to have a human readable, translatable label as well as a description. These should be implemented using the i18n system, with the identifier as the prefix: richtext_tag_<identifier>label, richtext_tag<identifier>_description.
Attributes posted for a custom tag in XML should be validated for :
- existence: an error should occur if a custom attribute is set but not defined in the configuration).
- required status: if a required attribute is missing, an error should be thrown.
- type: if an attribute doesn't have the right type, an error should be thrown.