"""
Handling the list of available pages
"""
# for page_list
from page_tree import page_tree
class Menu (object) :
"""
Contains info needed to render the menu
"""
def __init__ (self, page) :
"""
Gather the menu information for the given page
"""
# the selected page
self.page = page_tree.get_page(page.url)
# the selected pagen's inheritance
self.ancestry = self.page.get_ancestry() if self.page else []
# list of menu items == root children, since we always show the full menu...
self.items = page_tree.root.children