7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » DataObjectManager Code Examples
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: | 17813 Views |
-
Re: DataObjectManager Code Examples

3 February 2010 at 8:56am
sorry if i sound stupid, but what do you mean by that?
(as an FYI i have done a new install, only modules being: SWF upload and DataObjectManager)
I have onlu uploaded 1 file and ticked " This resource is viewable by the public " -
Re: DataObjectManager Code Examples

3 February 2010 at 9:10am
You'll need to decorate the Group object by adding it in your _config.php
DataObject::add_extension("Group","MyGroupDecorator");
Where "MyGroupDecorator" is the name of the class you're using to extend the Group.
-
Re: DataObjectManager Code Examples

3 February 2010 at 9:13am
Here's an example of a decorator for the Group:
MyGroup.php
class MyGroup extends DataObjectDecorator
{
function extraStatics()
{
return array(
'belongs_many_many' => array(
'Resources' => 'Resource',
'ResourcePage' => 'ResourcePage'
)
);
}
} -
Re: DataObjectManager Code Examples

3 February 2010 at 9:38am
Thanks for the help, but i think i am stepping a little out of my depth.
I'm ok to play with the php but i'm struggling, its on my books to learn it but as of now i consider myself a designer with html, css and coffee
i really should put my mind to learning to write the stuff (php, javascript and ajax off my head and not just break it).
I will have a fresh look tomorrow. thanks UncleCheese.
-
Re: DataObjectManager Code Examples

3 February 2010 at 10:07am
Yeah, decorators are a little tricky. Do you need the the feature of associating resources with a Group, or did you just want the hierarchy that is used in that example?
-
Re: DataObjectManager Code Examples

3 February 2010 at 10:10am
Group would be advantageous I won’t lie, and the potential client would find it useful, Im basically doing all this speculativly...
Ability for some files available via public connection, and registered members ability to access others.
-
Re: DataObjectManager Code Examples

5 March 2010 at 11:23am
Hey,
Are there any code examples for using DataObjectManager in a Page controller? ie front end in blackcandy?
Cheers,
Josh -
Re: DataObjectManager Code Examples

17 March 2010 at 8:35pm
Josh,
The firs time I did that, I used the Testimonials tutorial in the DOM documentation in the Wiki, and applied it into my page template. It worked for me, and taught me what I was doing.
| 17813 Views | ||
| Go to Top | Next > |


