Compare commits
2 commits
a68dcb7574
...
780a4ce2d7
Author | SHA1 | Date | |
---|---|---|---|
|
780a4ce2d7 | ||
|
31a0a6b060 |
1 changed files with 3 additions and 5 deletions
|
@ -78,22 +78,20 @@ def menuitems_children(parent, context=None):
|
|||
items_to_remove = []
|
||||
for menuitem in menuitems_children:
|
||||
try:
|
||||
if type(menuitem) == ContactForm:
|
||||
menuitem.title = menuitem.title
|
||||
else:
|
||||
menuitem.title = menuitem.trans_title
|
||||
if 'devenez' in menuitem.title.lower() and remove_devenez:
|
||||
items_to_remove.append(menuitem)
|
||||
elif 'mitglied werden' in menuitem.title.lower() and remove_mitglied:
|
||||
items_to_remove.append(menuitem)
|
||||
menuitem.title = menuitem.trans_title
|
||||
except AttributeError:
|
||||
print("Menuitem %s has an issue :: %s" % (menuitem.title, str(ae)))
|
||||
pass
|
||||
for item in items_to_remove:
|
||||
menuitems_children = menuitems_children & Page.objects.not_page(item)
|
||||
if context:
|
||||
request = context['request']
|
||||
site = Site.find_for_request(request)
|
||||
if site in ['sphc.ch', 'public-health.ch']:
|
||||
if site.hostname in ['sphc.ch', 'public-health.ch']:
|
||||
print("site is %s, add terms and conditions to footer" % site.hostname)
|
||||
# custom page here is the terms and conditions page for public-health.ch and sphc.ch (common)
|
||||
custom_page_id = 994
|
||||
|
|
Loading…
Reference in a new issue