@@ -0,0 +1,982 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.utils.translation import ugettext_lazy as _%0A%0Afrom cms.menu_bases import CMSAttachMenu%0Afrom menus.base import NavigationNode%0Afrom menus.menu_pool import menu_pool%0A%0A%0Aclass CatalogMenu(CMSAttachMenu):%0A    name = _(%22Catalog Menu%22)%0A%0A    def get_nodes(self, request):%0A        try:%0A            if self.instance.publisher_is_draft:%0A                productpage_set = self.instance.publisher_public.productpage_set%0A            else:%0A                productpage_set = self.instance.productpage_set%0A        except AttributeError:%0A            return %5B%5D%0A        nodes = %5B%5D%0A        for id, productpage in enumerate(productpage_set.all(), 1):%0A            node = NavigationNode(%0A                title=productpage.product.product_name,%0A                url=productpage.product.get_absolute_url(),%0A                id=id,%0A            )%0A            nodes.append(node)%0A        return nodes%0A%0Amenu_pool.register_menu(CatalogMenu)%0A

Add CatalogMenu allowing to use the CMS menu system for products