summaryrefslogtreecommitdiffstats
path: root/core/views/expo.py
diff options
context:
space:
mode:
Diffstat (limited to 'core/views/expo.py')
-rw-r--r--core/views/expo.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/views/expo.py b/core/views/expo.py
index 330733e..05f9499 100644
--- a/core/views/expo.py
+++ b/core/views/expo.py
@@ -174,10 +174,17 @@ def expowebpage(request, expowebpath, path):
menumatch = re.match(r'(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE)
if menumatch:
has_menu = True
+
+ m = re.search(r"(162\d\/[^\/]+)[\/\.]", path, re.DOTALL + re.IGNORECASE)
+ if m:
+ path_start, = m.groups()
+ parent_caves = Cave.objects.filter(url__startswith = path_start)
+ else:
+ parent_caves = None
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})
+ 'body': body, 'homepage': (path == "index.htm"), 'has_menu': has_menu, '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.