lib/menu.py
changeset 16 4a40718c7b4b
parent 13 178ea40bbc44
equal deleted inserted replaced
15:e2fe2baa7910 16:4a40718c7b4b
     1 """
     1 """
     2     Handling the list of available pages
     2     Handling the list of available pages
     3 """
     3 """
     4 
     4 
     5 # for page_list
     5 # for page_list
     6 from page import page_tree as _page_tree
     6 from page_tree import page_tree
     7 
     7 
     8 class Menu (object) :
     8 class Menu (object) :
     9     """
     9     """
    10         Contains info needed to render the menu
    10         Contains info needed to render the menu
    11     """
    11     """
    14         """
    14         """
    15             Gather the menu information for the given page
    15             Gather the menu information for the given page
    16         """
    16         """
    17 
    17 
    18         # the selected page
    18         # the selected page
    19         self.page = _page_tree.get_page(page.url)
    19         self.page = page_tree.get_page(page.url)
    20 
    20 
    21         # the selected pagen's inheritance
    21         # the selected pagen's inheritance
    22         self.ancestry = self.page.get_ancestry() if self.page else []
    22         self.ancestry = self.page.get_ancestry() if self.page else []
    23         
    23         
    24         # list of menu items == page siblings
    24         # list of menu items == root children, since we always show the full menu...
    25         self.items = _page_tree.root.children
    25         self.items = page_tree.root.children
    26     
    26