Displaying 1 result from an estimated 1 matches for "childable".
2010 May 25
2
Site Navigation With Polymorphic Has Many Through
...t can deal with any model being in the nav, allow
nesting, and can dynamically update.
So I thought about it for a while, and decided on a MenuItems class, which
contained the position of the child in relation to it''s siblings, where the
parent and the child were polymorphic. Then a given childable object can
find it''s parentable by going through the menu_items table.
I want my nav to be able to do things like this:
--Category1
----SubCategory1
------Product1
------Product2
----Product3
--Category2
----Product4
--Page1
--Page2
--Page3
This is the current setup:
MODELS
class Menu...