EllisLab text mark
Advanced Search
     
Using a model from another one
Posted: 01 September 2007 01:49 PM   [ Ignore ]
Joined: 2007-08-26
4 posts

hello,

I’d like to use a model from another one. I saw that it’s not possible to load a model in another model.
Is there a way to do what I want? Is it ugly?

Thank you

 
Posted: 01 September 2007 04:04 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2006-07-10
485 posts

On the wiki, there is an article and some code for using nested sets by Thunder. Take a look at the example code to see how the category model was extended from the nested sets model. The category model basically inheirts the nested sets model methods and either overloads those nested sets model methods and/or includes new methods.