Reload the root template with a view is not loaded via AJAX.

Signed-off-by: Eric Riggs <ericriggs42@gmail.com>
This commit is contained in:
Eric Riggs
2018-03-08 04:47:32 -04:00
committed by Roberto Rosario
parent 5f80563e49
commit c7caa53b52

View File

@@ -6,6 +6,17 @@
{% load common_tags %}
{% load navigation_tags %}
<script>
if (typeof partialNavigation === 'undefined') {
/* Check if the template was not loaded via AJAX
* If not then reload the root path passing the
* current location's path as the new hash
*/
var currentPath = window.location.pathname;
window.location = '/#' + currentPath;
}
</script>
{% if appearance_type == 'plain' %}
{% block content_plain %}{% endblock %}
{% else %}