2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-28 18:11:52 +00:00

Do not allow for the main menu to be overriden, instead display old menu at bottom of page. To do this the id of the main menu was changed from links to menulinks

This commit is contained in:
Martin Green 2022-06-25 01:07:17 +01:00
parent abdea22899
commit d607b30953
2 changed files with 2 additions and 5 deletions

View File

@ -168,12 +168,9 @@ def expowebpage(request, expowebpath, path):
editable = os.access(expowebpath / path, os.W_OK) # are file permissions writeable? editable = os.access(expowebpath / path, os.W_OK) # are file permissions writeable?
has_menu = False has_menu = False
menumatch = re.match(r'(.*)<div id="menu">', body, re.DOTALL + re.IGNORECASE)
if menumatch:
has_menu = True
menumatch = re.match(r'(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE) menumatch = re.match(r'(.*)<ul id="links">', body, re.DOTALL + re.IGNORECASE)
if menumatch: if menumatch:
has_menu = True has_menu = False
#Determine which caves this page relates to #Determine which caves this page relates to
m = re.search(r"(162\d\/[^\/]+)[\/\.]", path, re.DOTALL + re.IGNORECASE) m = re.search(r"(162\d\/[^\/]+)[\/\.]", path, re.DOTALL + re.IGNORECASE)

View File

@ -1,6 +1,6 @@
{% if not homepage %} {% if not homepage %}
<div id="menu"> <div id="menu">
<ul id="links"> <ul id="menulinks">
<li><a href="/index.htm">Home</a></li> <li><a href="/index.htm">Home</a></li>
<li><a href="/handbook/index.htm">Handbook</a> <li><a href="/handbook/index.htm">Handbook</a>
{% if handbook %} {% if handbook %}