def getMenu(self, component, id): u"""Answer the list of menu articles in this component.""" data = Data() data.menuItems = [] article = self.getArticle(component, id) if article: for menu in article.menu: menuArticle = self.getArticle(component, menu.attrib['id']) if menuArticle is not None: data.menuItems.append(menuArticle) return data