+ {% with prev_page_slug=site_uri.slug|add:"-1" curr_page_slug=site_uri.slug next_page_slug=site_uri.slug|add:"+1" page_list=html %}
+
+ {% if prev_page_slug == 0 %}
+
+ < Previous
+
+ {% else %}
+
+ < Previous
+
+ {% endif %}
+
+ {% with pages=page_list|default:"1" %}
+ {% for page in pages.split %}
+
+ {{ page }}
+
+ {% endfor %}
+ {% endwith %}
+
+ {% if next_page_slug == 6 %}
+
+ Next >
+
+ {% else %}
+
+ Next >
+
+ {% endif %}
+
+ {% endwith %}
+
diff --git a/taccsite_cms/templatetags/tacc_uri_shortcuts.py b/taccsite_cms/templatetags/tacc_uri_shortcuts.py
index c20fedca5..c583d2be3 100644
--- a/taccsite_cms/templatetags/tacc_uri_shortcuts.py
+++ b/taccsite_cms/templatetags/tacc_uri_shortcuts.py
@@ -1,6 +1,7 @@
from django import template
from urllib.parse import urlparse
from django.utils.html import format_html
+from os.path import normpath, basename
register = template.Library()
@@ -13,11 +14,13 @@ def site_uri(context):
Load custom tag into template:
{% load tacc_uri_shortcuts %}
+ {% site_uri as site_uri %}
Template inline usage:
{% site_uri.absolute_uri %}
{% site_uri.scheme %}
{% site_uri.host %}
+ {% site_uri.slug %}
Example: