Skip to content
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

Document how to display a term label (or other field on a term) rather than the raw term name #1535

Open
mjordan opened this issue Jun 3, 2020 · 2 comments
Labels
Subject: Metadata related to metadata issues. Consider also using the search tag. Type: documentation provides documentation or asks for documentation.

Comments

@mjordan
Copy link
Contributor

mjordan commented Jun 3, 2020

It should be possible to configure Drupal to display to users a human-friendly label for a term rather than the raw term name. For example, a taxonomy comprised of ISO 639-2 language codes ('eng', 'fra', etc.) should be configurable to use a "display label" field, for example

eng

defined at the term level. What we should be displaying to the user in this case is 'English', not 'eng'. Using language codes as field values would be better practice than using language names, since the codes would be more machine-readable (useful if you are sharing your metadata for aggregation via OAI, for example).

I am using language as an example here but there are likely other examples of where metadata values are coded using standard vocabularies in this way.

Has anyone got any instructions for doing this sort of thing?

@mjordan mjordan changed the title Document how to display a term label rather than the raw term name Document how to display a term label (or other field on a term) rather than the raw term name Jun 3, 2020
@seth-shaw-unlv
Copy link
Contributor

I would swap the thinking on this one. I would use "Name" as the equivelent of Display label and then use a separate field for the machine value. In general you would want that "Display Value" to show and the few times you want the machine value instead (a view is the most likely case I can think of) are instances where you can configure using a different entity field.

@mjordan
Copy link
Contributor Author

mjordan commented Jun 3, 2020

Nice! I'd probably add an additional field that indicated what vocabulary/authority the code came from, so that value could be namespaced when necessary.

@kstapelfeldt kstapelfeldt added Type: documentation provides documentation or asks for documentation. Subject: Metadata related to metadata issues. Consider also using the search tag. and removed documentation labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: Metadata related to metadata issues. Consider also using the search tag. Type: documentation provides documentation or asks for documentation.
Projects
Development

No branches or pull requests

3 participants