On Sun, Sep 22, 2013 at 2:33 PM, Christophe (net) <[email protected]> wrote:
> Le 16/09/2013 04:55, Sharoon Thomas a écrit : > > The module adds a context_processor [8] to the nereid template context. >> This means that the function `menu_for` would be available >> anywhere/anytime in the template context and calling it would call the >> method `nereid.cms.menu.menu_for` [9]. The usage is explained in the doc >> string. >> > > Yes, I saw this information and I also find a very comprehensive example > (for me) in the test function of the module. But my question was wearing > rather the relationship between the object Menu and the object MenuItem. > Specifically I can not building a custom menu with product category (that's > OK) and MenuItem objects pointing to article category (my pb is here) or > any other object. The full_url field [1] was meant to do exactly that but the function field is yet to be implemented. However, this is not a difficult job since version 2.6 since the menu_item.reference (a generic reference field) would return an active record and you could probably call a method in that which returns the url. You could then use that to point the menu item to the object. [1] https://github.com/openlabs/nereid-cms/blob/master/cms.py#L239 -- -- Sharoon Thomas Openlabs Technologies & Consulting (P) Limited w: http://www.openlabs.co.in m: +1 813.793.6736 (OPEN) Extn. 200 t: @sharoonthomas - We Win When our Customers Win
