mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-18 10:37:05 +00:00
Added link to parent cave in menu
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user