|
@@ -271,7 +271,7 @@ def printBlogMenu(year_min=None, year_max=None):
|
271
|
271
|
print("</ul>")
|
272
|
272
|
|
273
|
273
|
def printProjectsMenu():
|
274
|
|
- # prints all pages with parent 'projects' or 'stuff'.
|
|
274
|
+ # prints all pages with parent or second_parent 'projects' or 'stuff'.
|
275
|
275
|
# first the ones without date, sorted by position.
|
276
|
276
|
# this first section includes sub-headings for children
|
277
|
277
|
# in a hidden div, expanding when clicking the description.
|
|
@@ -282,7 +282,7 @@ def printProjectsMenu():
|
282
|
282
|
# select pages without date
|
283
|
283
|
dpages = [p for p in enpages if p.get("date", "") == ""]
|
284
|
284
|
# only those that have a parent in ['projects', 'stuff']
|
285
|
|
- mpages = [p for p in dpages if any(x in p.get("parent", "") for x in [ 'projects', 'stuff' ])]
|
|
285
|
+ mpages = [p for p in dpages if any((x in p.get("parent", "")) or (x in p.get("second_parent", "")) for x in [ 'projects', 'stuff' ])]
|
286
|
286
|
# sort by position
|
287
|
287
|
mpages.sort(key=lambda p: [int(p.get("position", "999"))])
|
288
|
288
|
|
|
@@ -312,7 +312,7 @@ def printProjectsMenu():
|
312
|
312
|
# slect pages with a date
|
313
|
313
|
dpages = [p for p in enpages if p.get("date", "") != ""]
|
314
|
314
|
# only those that have a parent in ['projects', 'stuff']
|
315
|
|
- mpages = [p for p in dpages if any(x in p.get("parent", "") for x in [ 'projects', 'stuff' ])]
|
|
315
|
+ mpages = [p for p in dpages if any((x in p.get("parent", "")) or (x in p.get("second_parent", "")) for x in [ 'projects', 'stuff' ])]
|
316
|
316
|
# sort by date
|
317
|
317
|
mpages.sort(key=lambda p: [p.get("date", "9999-01-01")], reverse = True)
|
318
|
318
|
|