summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/views/expo.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index 05f9499..55a34be 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -175,6 +175,7 @@ def expowebpage(request, expowebpath, path):
if menumatch:
has_menu = True
+ #Determine which caves this page relates to
m = re.search(r"(162\d\/[^\/]+)[\/\.]", path, re.DOTALL + re.IGNORECASE)
if m:
path_start, = m.groups()
@@ -182,9 +183,19 @@ def expowebpage(request, expowebpath, path):
else:
parent_caves = None
+ #Determine if this page relates to a particular year
+ m = re.search(r"years\/(\d\d\d\d)\/.*", path, re.DOTALL + re.IGNORECASE)
+ if m:
+ year, = m.groups()
+ else:
+ year = None
+
+ #Determine if this page is part of the handbook
handbook = path.startswith("handbook")
+
return render(request, 'expopage.html', {'editable': editable, 'path': path, 'title': title,
- 'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu, 'handbook': handbook, 'parent_caves': parent_caves})
+ 'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu,
+ 'year': year,'handbook': handbook, 'parent_caves': parent_caves})
def mediapage(request, subpath=None, doc_root=None):
'''This is for special prefix paths /photos/ /site_media/, /static/ etc.