7935 Posts in 1536 Topics by 943 members
|Go to End|
3 April 2010 at 8:43am Last edited: 3 April 2010 8:44am
I was wondering if why DOM needs a relationship between the page it is on and the objects it is managing. I know that most of the time this is the desired behavior. However there are many times I want to use DOM to manage objects that don't need a relationship to any page but I do need a place for the DOM to reside in the CMS.
I have a case where I have a page in the CMS where I edit the Content and a VideoFAQ Object. However the page in the CMS is never seen on the public site nor is it in any menu. I just use that page as a central place to manage the Content and VideoFAQ objects. The objects and Content are shown on three other pages and it is the same for all three pages.
It does work to have a $has_one on the VideoFAQ object for the admin page and a $has_many on the admin page for the VideoFAQ objects but I never use the relationships to do anything because when I want to show a list of the VideoFAQs on any page I just have a function that returns all of them regardless of the page they are related to.
That all being said even though it works to have this relationship it is uncessesary in my case. Is the way I have it set up the way you would do it? I could use ModelAdmin to manage my VideoFAQ objects but I don't like it very much.
3 April 2010 at 8:53am
Unfortunately, no, you have to hang the Dataobject somewhere. Often times, I just use my HomePage for lack of a better spot, just to avoid using ModelAdmin.
You raise questions that are really under thorough examination right now. The new version of DOM will allow this, and we're also in the process of giving ModelAdmin a beat-down and a complete makeover to better address workflows like this.
|Go to Top|