diff --git a/ckanext/geoview/templates/geoview/snippets/geojson_asset.html b/ckanext/geoview/templates/geoview/snippets/geojson_asset.html index 84afd901..6c412a70 100644 --- a/ckanext/geoview/templates/geoview/snippets/geojson_asset.html +++ b/ckanext/geoview/templates/geoview/snippets/geojson_asset.html @@ -1,6 +1,11 @@ -{% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %} -{# strip '/base/' prefix and '.css' suffix #} -{% asset main_css[6:-4] %} +{% if h.ckan_version().split('.') | map('int')| list >= [2, 9, 6] %} + {% set theme = h.get_rtl_theme() if h.is_rtl_language() else g.theme %} + {% asset theme %} +{% else %} + {% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %} + {# strip '/base/' prefix and '.css' suffix #} + {% asset main_css[6:-4] %} +{% endif %} {% asset 'ckanext-geoview/geojson_js' %} {% asset 'ckanext-geoview/geojson_css' %} diff --git a/ckanext/geoview/templates/geoview/snippets/shp_asset.html b/ckanext/geoview/templates/geoview/snippets/shp_asset.html index ed452bec..71e932db 100644 --- a/ckanext/geoview/templates/geoview/snippets/shp_asset.html +++ b/ckanext/geoview/templates/geoview/snippets/shp_asset.html @@ -1,6 +1,11 @@ -{% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %} -{# strip '/base/' prefix and '.css' suffix #} -{% asset main_css[6:-4] %} +{% if h.ckan_version().split('.') | map('int')| list >= [2, 9, 6] %} + {% set theme = h.get_rtl_theme() if h.is_rtl_language() else g.theme %} + {% asset theme %} +{% else %} + {% set main_css = h.get_rtl_css() if h.is_rtl_language() else g.main_css %} + {# strip '/base/' prefix and '.css' suffix #} + {% asset main_css[6:-4] %} +{% endif %} {% asset 'ckanext-geoview/shp_js' %} {% asset 'ckanext-geoview/shp_css' %}