Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DOM without relationships?

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 665 Views
  • micahsheets
    Avatar
    Community Member
    164 Posts

    DOM without relationships? Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: DOM without relationships? Link to this post

    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.

    665 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.