From 21c6a61912848ae5a8e2bcd3efb5fe858c313df3 Mon Sep 17 00:00:00 2001 From: Tom Kralidis Date: Thu, 7 Nov 2019 15:16:14 -0500 Subject: [PATCH] add feature collection and featutre id to HTML representations (#26) (#296) --- pygeoapi/api.py | 1 + pygeoapi/templates/item.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pygeoapi/api.py b/pygeoapi/api.py index c9de27b..22f9919 100644 --- a/pygeoapi/api.py +++ b/pygeoapi/api.py @@ -819,6 +819,7 @@ class API(object): content['links'][0]['rel'] = 'alternate' content['links'][1]['rel'] = 'self' + content['title'] = self.config['datasets'][dataset]['title'] content = _render_j2_template(self.config, 'item.html', content) diff --git a/pygeoapi/templates/item.html b/pygeoapi/templates/item.html index 6f3e1cc..5b5b171 100644 --- a/pygeoapi/templates/item.html +++ b/pygeoapi/templates/item.html @@ -12,7 +12,7 @@ {{ v | urlize() }} {% endif %} {%- endmacro %} -{% block title %}{{ super() }} {{ data['title'] }} {% endblock %} +{% block title %}{{ super() }} {{ data['title'] }} - {{ data['id'] }}{% endblock %} {% block crumbs %}{{ super() }} / Collections {% for link in data['links'] %}