Jump to:

22972 Posts in 11596 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » Draft mode for DataObject?

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1 2
Go to End
Author Topic: 3991 Views
  • Mo
    Avatar
    Community Member
    485 Posts

    Re: Draft mode for DataObject? Link to this post

    Also, I have posted all classes involved here: http://pastie.org/private/ciddetwtqzfxdlzcbjtvcq

    Cheers,

    Mo

  • andy_steel
    Avatar
    Community Member
    31 Posts

    Re: Draft mode for DataObject? Link to this post

    I solved my problem by simply adding a checkbox so the user can decide if the object will be published or not. Perhaps not a perfect solution, but it did the job for me.

  • Mo
    Avatar
    Community Member
    485 Posts

    Re: Draft mode for DataObject? Link to this post

    Hmm, thats an idea.

    Its a bit more work, but you could create an extension to HiddenFormField that is responsible for publishing these DataObjects on publish?

    Mo

  • RuthAdele
    Avatar
    Community Member
    18 Posts

    Re: Draft mode for DataObject? Link to this post

    I've been able to get the versioned extension working on my DataObject! (sort of...)
    $this->Fields() didn't work for me either, I was getting the same method error that someone else was getting, so I specified the DataObject I was trying to version - instead of $this->Fields, I used $this->HomepageResources() (substitute for your DataObject Class name)

    So, the versioned table works if you add new entries, or if you change existing ones, HOWEVER, it does not update if I delete a entry.

    Does anyone have any idea why this is happening or how to fix it?

    Thanks

    3991 Views
Page: 1 2
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.