lib/menu.py
author Tero Marttila <terom@fixme.fi>
Sat, 07 Feb 2009 01:33:30 +0200
changeset 11 fa216534ae45
parent 9 2a47b00f60b0
child 12 2abc5ace0b15
permissions -rw-r--r--
funky PageTree stuff
"""
    Handling the list of available pages
"""

# for page_list
from page import page_tree as _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)
        
        # list of menu items == page siblings
        self.items = _page_tree.get_siblings(page.url)