diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html
index 496d466b78..06c6111da1 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/country.html
@@ -9,6 +9,11 @@
{{ data.country_dict.display_name }}
{% endblock %}
+{% block links %}
+
+ {{ super() }}
+{% endblock %}
+
{% block crisis_map %}
{% block crisis_actions %}
{% endblock %}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/custom_country.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/custom_country.html
index c0bd840ce7..db0c2d8c01 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/custom_country.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/country/custom_country.html
@@ -17,6 +17,12 @@
{% endif %}
{% endblock %}
+
+{% block links %}
+
+ {{ super() }}
+{% endblock %}
+
{% block breadcrumb_content %}
{% snippet "snippets/other_breadcrumb_item.html", title=_('Groups'), controller='group', action='index', position=2 %}
{{ h.nav_link(data.country_title,
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/index.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/index.html
index 3ea44e3912..3334c15996 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/index.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/index.html
@@ -6,6 +6,11 @@
{% asset 'hdx_theme/organizations-styles' %}
{% endblock %}
+{% block links %}
+
+ {{ super() }}
+{% endblock %}
+
{% set logged_in = true if c.userobj else false %}
{% set is_sys_admin = c.userobj.sysadmin %}
{% block subtitle %}{{ _('Organisations') }}{% endblock %}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/read.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/read.html
index 7469a49253..b71486a733 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/read.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/organization/read.html
@@ -6,6 +6,7 @@
{% asset 'hdx_theme/organization-light-styles' %}
{% endblock -%}
+{% block subtitle %}{{ org.title }}{% endblock %}
{% block links %}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/search/search.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/search/search.html
index 8c6c157880..6880e3770c 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/search/search.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/light/search/search.html
@@ -6,6 +6,8 @@
{% asset 'hdx_theme/search-light-styles' %}
{% endblock -%}
+{% block subtitle %}{{ _("Search for a Dataset") }}{% endblock %}
+
{% block links %}
{{ super() }}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/custom/custom_org.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/custom/custom_org.html
index 55996c9672..44dfc39b05 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/custom/custom_org.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/custom/custom_org.html
@@ -1,6 +1,11 @@
{% extends "page.html" %}
{% set page_has_mobile_version = True %}
+{% block links %}
+
+ {{ super() }}
+{% endblock %}
+
{% block styles %}
{{ super() }}
{% asset 'hdx_theme/custom-org-search-facets-styles' %}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/index.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/index.html
index b8fb5e7e5f..70b7c79989 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/index.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/index.html
@@ -3,6 +3,11 @@
{% set is_sys_admin = c.userobj.sysadmin %}
{% block subtitle %}{{ _('Organisations') }}{% endblock %}
+{% block links %}
+
+ {{ super() }}
+{% endblock %}
+
{% block breadcrumb_content %}
{% link_for _('Organisations'), controller='organization', action='index' %}
{% endblock %}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read_base.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read_base.html
index d510685c0e..4eec3f7fcb 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read_base.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/read_base.html
@@ -37,6 +37,7 @@
{% endblock %}
{% block links %}
+
{{ super() }}
{% if 'country_dict' in org_dict %}
{% set group_dict = org_dict %}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/templates/pages/read_page.html b/ckanext-hdx_theme/ckanext/hdx_theme/templates/pages/read_page.html
index 7d4c5df37f..f04d84b861 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/templates/pages/read_page.html
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/templates/pages/read_page.html
@@ -5,6 +5,11 @@
{% block subtitle %}{{ data.title or data.name }}{% endblock %}
+{% block links %}
+
+ {{ super() }}
+{% endblock %}
+
{% block breadcrumb_content %}
{{ data.type }}
{% if data.type == 'event' %}
diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/util/light_redirect.py b/ckanext-hdx_theme/ckanext/hdx_theme/util/light_redirect.py
index f5663f9b7c..71201b412b 100644
--- a/ckanext-hdx_theme/ckanext/hdx_theme/util/light_redirect.py
+++ b/ckanext-hdx_theme/ckanext/hdx_theme/util/light_redirect.py
@@ -107,5 +107,24 @@ def switch_url_path(path=None, force=True):
new_path = urlparse.urlunparse(
parsed_url[0:4] + (query + force_query,) + parsed_url[5:]
)
+ else:
+ parsed_url = urlparse.urlparse(new_path)
+ query_params = urlparse.parse_qs(parsed_url.query, True)
+
+ if FORCE_REDIRECT_URL_PARAM in query_params:
+ del query_params[FORCE_REDIRECT_URL_PARAM]
+
+ # Reconstruct the URL
+ new_query = urlparse.urlencode(query_params, doseq=True)
+ new_url = urlparse.urlunparse((
+ parsed_url.scheme,
+ parsed_url.netloc,
+ parsed_url.path,
+ parsed_url.params,
+ new_query,
+ parsed_url.fragment
+ ))
+
+ new_path = new_url
return new_path