7919 Posts in 1358 Topics by 932 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Preview: DataObjectManager module
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 54669 Views |
-
Re: Preview: DataObjectManager module

4 March 2009 at 6:09am Last edited: 4 March 2009 6:10am
Hey drye thanks for the link, that looks pretty good! Not sure about the font though ;)
-
Re: Preview: DataObjectManager module

7 March 2009 at 11:06am
Got it working well! Thanks heaps for all your recent work UncleCheese.
I am using this module to create a website planning page that we can use with new clients. Just a couple of questions:
1: How would I go about getting an email sent whenever a new dataobject is added? ie, if they add an document to a page it sends me an email letting me know.2: Is there a way to have the date set in the popup automatically to 'Todays' date so we can order additions by date added? I tried:
$todaysdate = date('d/m/Y');
return new FieldSet(
new CalendarDateField('Date', 'Date', $todaysdate),
But it didnt seem to work - date field remained blank3: I have a FileDataObjectManager and a DataObjectManager on the same pagetype on different tabs, how can I set different things for the manager of each ie: $manager->setPluralTitle('Documents'); for one and $manager->setPluralTitle('Comment'); for the other?
Cheers,
Howard
-
Re: Preview: DataObjectManager module

8 March 2009 at 12:34am
Just wanted to say thanks for all the work on this module.... I found it just in time to use in a couple of current projects and it has really made the difference between an average backend workaround (read hack!) and a system that really adds value to a clients website. Thanks to UncleCheese & everyone else!
-
Re: Preview: DataObjectManager module

8 March 2009 at 3:15am
@Tsunami - Thanks so much for the feedback. I'm putting together a list of testimonials about the DataObjectManager and ImageGallery. I'd like to use that if you don't mind.
@howard -
1: How would I go about getting an email sent whenever a new dataobject is added? ie, if they add an document to a page it sends me an email letting me know.
==> This is a little tricky. You have to use the onBeforeWrite() hook in the DataObject class.
class MyObject extends DataObject
{
function onBeforeWrite()
{
if(!$this->ID) {
// Do email notification
}
parent::onBeforeWrite();
}
}2: Is there a way to have the date set in the popup automatically to 'Todays' date so we can order additions by date added?
==> Nice catch on this one. The DataObjectManager popup is designed to sniff out CalendarDateFields and substitute them with DatePickerField (jQuery based). In that process, it was only feeding the name and title to the DatePickerField. I've added Value to that, as well. Also, I've updated DatePickerField to default to today's date, and it is now a readonly field.
3: I have a FileDataObjectManager and a DataObjectManager on the same pagetype on different tabs, how can I set different things for the manager of each ie: $manager->setPluralTitle('Documents'); for one and $manager->setPluralTitle('Comment'); for the other?
==> Provided each DataObjectManager is stored in different variables, this should not be a problem.
$manager1 = new DataObjectManager(....);
$manager1->setPluralTitle('foo');$manager2 = new DataObjectManager(...);
$manager2->setPluralTitle('bar');They should be self-contained objects. Let me know if that's not working for you.
-
Re: Preview: DataObjectManager module

8 March 2009 at 6:55am Last edited: 8 March 2009 7:23am
@UncleCheese I have to say again NICE WORK. I am using the ImageDataObjectManager and it doesn't seem to have the drag reorder option enabled. Am I missing something simple? At first I thought I needed your other extension SortableDataObject, but then I saw this quote from you: "Also, SortableDataObject is obsolete since it has been merged into the DataObjectManager extension." Please let me know if I am missing something, or if there is a reason that the ImageDataObjectManager can't do the drag and drop sorting.
EDIT: Never mind... After watching a little more closely your youTube video steered me in the right direction. THANKS! In the _config.php of the dataobject_manager I had to add:SortableDataObject::add_sortable_class('ImageShowItem'); I suppose I could also put them in the mysite/_config.php
Thanks again!
-
Re: Preview: DataObjectManager module

8 March 2009 at 7:25am Last edited: 8 March 2009 7:26am
You are missing something. Lucky for you, I just put the docs up.
http://doc.silverstripe.com/doku.php?id=modules:dataobjectmanager#activate_drag-and-drop_sorting
Edit: Looks like you got it. Yes, it is probably more appropriate to put that in mysite/_config.php.
-
Re: Preview: DataObjectManager module

8 March 2009 at 7:27am
Thanks again, this is still the best and most needed extension to have come out!
-
Re: Preview: DataObjectManager module

8 March 2009 at 7:39am
With the added documentation, I have to say that the DataObjectManager Module is the most useful extension to date. UncleCheese has out done himself.
| 54669 Views | ||
| Go to Top | Next > |



