-
Notifications
You must be signed in to change notification settings - Fork 635
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
Ability to rename fields from the Field Layout Designer #806
Comments
Liking this a lot after finding it ;) i had been thinking of asking for 'field aliases' to have same renaming purposes. Some of the proposals are interesting, but for my money (?) just the ability to re-use the field def by renaming would accomplish a great deal. No complications then also. |
Just released today! https://github.com/benjamminf/craft-relabel |
@florian appreciate the link to my plugin! Though I'm actually working on a new plugin that does exactly this: |
This for now is nearly exactly what is needed (as a quick solution for this) |
@christian – Yes, that's exactly what I'm picturing, sorry for repeating your previous comment :) |
@Mats @Neal yes, that's exactly what I meant with my previous comment. I should work on improving my english!! The Field Layout Designer has this little config gear next to each field (to remove a field or make it required). This is where the new settings could go "Set Name" and "Set Instructions". And in the field settings (settings > fields > my field) you'd just set defaults for name and instruction. |
@Mats yep - that sounds right, but would extend, if possible, to include the ability to also set the helper text. It basically the same as the 'Title' field. That's its default label, but you can override on a per-use basis. |
Really, this boils down to being able to define different CP UI labels for the same field across different entry types/field layouts? The simplest possible implementation I could imagine, is that the FieldLayoutModel is extended with an array of field aliases (or labels, as it were). It could work like this: Whenever you assign a specific field (e.g. "Article Excerpt", with the handle "articleExcerpt") to a field layout, you have the option to give that field an alias. The alias is used as the field's label in the CP UI for that specific entry type, but nowhere else – for example you'd still need to use the actual handle ("articleExcerpt") in templates and whatnot. This would go a long way in increasing field re-use and UI semantics. If an "excerpt" is an "excerpt", it makes total sense to not create multiple fields doing exactly the same thing, just to be able to have an entry type field layout that makes sense semantically/contextually for the client. |
@ben - Just to clarify - The request is not for multiple instances, but rather a single instance with the ability to amend the title and/or instruction text on a per-use basis. I feel that @patrick's suggestion of being able to define every setting when adding it to the field designer would end up getting complicated very quickly, and this is not something I'm 'arguing' for. |
The name of this feature request is misleading. It proposes a simple quick-edit feature in the title and goes on to argue for multiple instances of a single field type which is an architectural change which would completely change the UI and make the request to make things easier to edit theoretical because we are not familiar with what the UI would even look like. I'm in the camp that thinks this may get complicated quickly and that the tradeoffs in the UI of managing multiple and varying instances of the same field type may be worse than the alternative, of just having to manage multiple fields. I do agree with the heart of this request. Craft could use better tools for quickly updating and managing fields and perhaps even creating new fields. If such updates to the current implementation of fields was done well, it may not even be necessary to consider making fields more complex. |
This would be resolved by #1524. |
Some fields can be re-used in many sections, but having a single label is often not ideal.
For example; you may create a simple 'plain text' field.
When adding to multiple sections you would be able to rename the label so the UI was clearer. e.g.
'Article excerpt' or 'Section intro'
Individual templates/macros could handle the different use cases, but would reduce the number of similar fields in the admin area
The text was updated successfully, but these errors were encountered: