Skip to content

Commit

Permalink
support aulternative_url's for spatial widget. This allows placing of…
Browse files Browse the repository at this point in the history
… the widget on pages other then the default dataset page. Use full_current_url to allow for ckan instances that are not hosted at the root, aka in sub folders.

To use:
{% snippet "spatial/snippets/spatial_query.html", default_extent=[[15.62, -139.21], [64.92, -61.87]] alternaive_url=h.full_current_url()%}
  • Loading branch information
Hakai Dev committed Oct 5, 2018
1 parent 3c66e24 commit 7abd586
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<h2 class="module-heading">
<i class="icon-medium icon-globe"></i>
{{ _('Filter by location') }}
<a href="{{ h.remove_url_param(['ext_bbox','ext_prev_extent', 'ext_location']) }}" class="action">{{ _('Clear') }}</a>
<a href="{{ h.remove_url_param(['ext_bbox','ext_prev_extent', 'ext_location'], alternative_url=alternative_url) }}" class="action">{{ _('Clear') }}</a>
</h2>
{% set map_config = h.get_common_map_config() %}
<div class="dataset-map" data-module="spatial-query" data-default_extent="{{ default_extent }}" data-module-map_config="{{ h.dump_json(map_config) }}">
Expand Down

0 comments on commit 7abd586

Please sign in to comment.