Open AgostiniAlessandro opened 1 year ago
I think this should be a different field on the content type that would drive how the content is rendered. Otherwise we would provide all the field options to all content items.
Here just add "Display Time" as a boolean field, and use it in your theme/template to decide how to render it.
Here just add "Display Time" as a boolean field, and use it in your theme/template to decide how to render it.
You're saying that this should only be a type-level, but not item-level setting, right?
@sebastienros I tested this (including my suggested changes under the PR) and seems to work correctly. I don't mind adding this, since it's opt-in.
I still think this should be a custom field on this type. You can still set the setting at the part level. You add an emumartion field to your types, and use this field to drive the UI in the template of this type. One template to update to get the same result.
The other thing we discussed is that if we'd be to accept it we would then accept it also for any setting of any fields.
Right now it’s possibile to configure a DateTimeField so that it allows the user to specify only the Date, only the Time or both. In some cases it would be useful to allow the user to override this setting for a specific content.
For example and Event content type may contain a DateTimeField representing its starting date/time so in the field's Display option will be set to DateTime in content definition but the user may want to only show the starting date for a particular event and right now this is not possible. By allowing the user to override the Display option value in the content we allow him to decide wether he wants the starting date or time to be shown for a particular event without having to modify the setting for the other contents of the same type.