- items = Document.objects.filter(folder__exact=folder, \
- islive__exact=True, slug__exact='index')
- for item in items:
+ if folder:
+ f = Folder.objects.get(parent__exact=folder, slug__exact=part)
+ else:
+ f = Folder.objects.get(parent__isnull=True, slug__exact=part)
+ folder = f
+ except:
+ break
+
+ # We have the folder (in theory)
+ menu_items = []
+ if folder:
+ items = Document.objects.filter(folder__exact=folder, \
+ islive__exact=True)
+ for item in items:
+ if item.slug != 'index':