From dd7ba418bc1789e9b8ecaf006a6e1458efb3e746 Mon Sep 17 00:00:00 2001 From: Paul van Genuchten Date: Sun, 12 Jun 2022 17:58:46 +0200 Subject: [PATCH] restore id-field override if title-field exists --- pygeoapi/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pygeoapi/api.py b/pygeoapi/api.py index 71171fe..7e848f3 100644 --- a/pygeoapi/api.py +++ b/pygeoapi/api.py @@ -1542,6 +1542,8 @@ class API: if p.title_field is not None: content['title_field'] = l10n.translate(p.title_field, request.locale) + # If title exists, use it as id in html templates + content['id_field'] = content['title_field'] content = render_j2_template(self.config, 'collections/items/index.html', content, request.locale)