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

indicate which attribute to use as label for an item #608

Merged
merged 1 commit into from
Feb 18, 2021

Conversation

pvgenuchten
Copy link
Contributor

This is a proposal for optimizing #133, it also brings in an aspect of #100. I wanted to combine the two to see the full benefit of it. In config you can assign one attribute as being the label/name/title of the item.

image

This value is then used as label on the map and title of the item page

image

image

I also introduced the capability to set this value in a multilingual way

image

In case you ask the french representation of the page, the french attribute will be used as label

image

This required a language to be taken from accept-language or url-override, which had quite impact on the code, i can image people may want to refactor that aspect, please make suggestions

I considered also an approach in which i would add this aspect as part of the context, maybe @alpha-beta-soup can provide some suggestion there, maybe both approaches can co-exist?

@pvgenuchten
Copy link
Contributor Author

the language mechanism introduced in #470 seems defined in a more generic way, does it include the option to get language from header. maybe better to merge 470 first and adopt the approach?

indicate which field to use as label for the item
@tomkralidis tomkralidis merged commit 96675af into geopython:master Feb 18, 2021
francbartoli pushed a commit to francbartoli/pygeoapi that referenced this pull request Jul 8, 2021
indicate which field to use as label for the item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants