terom@9: """ terom@9: Handling the list of available pages terom@9: """ terom@9: terom@9: class Menu (object) : terom@9: """ terom@9: Contains info needed to render the menu terom@9: """ terom@9: terom@31: def __init__ (self, fs, page) : terom@9: """ terom@31: Gather the menu information for the given page, as part of the given FilesystemMapper terom@9: """ terom@9: terom@9: # the selected page terom@31: self.page = fs.tree.get_page(page.url) terom@12: terom@12: # the selected pagen's inheritance terom@13: self.ancestry = self.page.get_ancestry() if self.page else [] terom@9: terom@16: # list of menu items == root children, since we always show the full menu... terom@31: self.items = fs.tree.root.children terom@9: