-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Allow Field Other Than 'title' To Be Used For Labelling Entries #1989
Comments
We actually already have this via Can you confirm this does what you need? |
@erquhart Thanks. Yes this is helpful. However it doesn't cover cases where you need a combination of fields to get a unique identifier, for example, imagine we have a 'User' collection with 'firstName' and 'lastName' fields. We need the identifier to be: |
The only place you need a unique identifier in the CMS is for slug (filename) creation, and the - name: posts
label: posts
slug: "{{firstName}}-{{lastName}}" If you're also referring to being able to tell entries apart in the collection view, #2019 covers that and I think we can do entry card customization in a more flexible way than interpolation within |
@erquhart Yes I was talking about interpolation as providing a way to make an entry title unique when there isn't a single field that can do this. In my example, there might be multiple users with the same first or last names, but by combining the two, a unique title for the entry can be arrived at. |
Do you agree that #2019 would cover it? |
Is your feature request related to a problem? Please describe.
Currently entries (the list of Collection items) are labelled using that item's
title
field. However, this is often confusing. For example, a page might be the 'About' page, but have a title of 'There Are A Few Things You Should Know About Us'. Obviously everyone would still consider this to be the 'About' page and that would be the most correct label for that page, however with the current setup, in order for someone to find the 'About' page, they need to know the title that page uses.Describe the solution you'd like
I'd like collections to expose a configuration parameter:
entryLabel
, that could override the use of the title field. That way, a hidden field can be used to track the obvious name for the page:Describe alternatives you've considered
The only alternative is to use a different field for the page title so that
title
can be used for the short page name, however this feels wrong. Title has a clear meaning, and this is confusing.Additional context
title
).inferredFields
object is created inEntryListing
and used inEntry
to populate thetitle
field. So it should just be a matter of passing in the config and using that instead of the inferred title if it exists.The text was updated successfully, but these errors were encountered: