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 "
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba
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 "
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.
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'
)
);
}
}
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 :D
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. :D
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?
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.
Hey,
Are there any code examples for using DataObjectManager in a Page controller? ie front end in blackcandy?
Cheers,
Josh
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.