sites/www.qmsk.net/menu.py
changeset 46 185504387370
parent 45 e94ab812c0c8
child 47 3d59c9eeffaa
equal deleted inserted replaced
45:e94ab812c0c8 46:185504387370
     1 """
       
     2     Handling the list of available pages
       
     3 """
       
     4 
       
     5 class Menu (object) :
       
     6     """
       
     7         Contains info needed to render the menu
       
     8     """
       
     9 
       
    10     def __init__ (self, fs, page) :
       
    11         """
       
    12             Gather the menu information for the given page, as part of the given FilesystemMapper
       
    13         """
       
    14 
       
    15         # the selected page
       
    16         self.page = fs.tree.get_page(page.url)
       
    17 
       
    18         # the selected pagen's inheritance
       
    19         self.ancestry = self.page.get_ancestry() if self.page else []
       
    20         
       
    21         # list of menu items == root children, since we always show the full menu...
       
    22         self.items = fs.tree.root.children
       
    23