Geographic extent now looks for id="dataset" because DGU templates use multiple classes for the root dataset div (as might other customised templates), yet having only one value for id is a reasonable assumption. Also works for core CKAN templates.

This commit is contained in:
David Read 2012-04-12 21:35:38 +01:00
parent 7280bc8d06
commit 2ecb8498bf
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ class DatasetExtentMap(SingletonPlugin):
if extent:
data = {'extent': extent,
'title': _('Geographic extent')}
stream = stream | Transformer('body//div[@class="dataset"]')\
stream = stream | Transformer('body//div[@id="dataset"]')\
.append(HTML(html.PACKAGE_MAP % data))
stream = stream | Transformer('head')\
.append(HTML(html.PACKAGE_MAP_EXTRA_HEADER % data))