Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DataObjectManager in Frontend


Go to End


7 Posts   1765 Views

Avatar
Stijn

Community Member, 46 Posts

23 September 2009 at 10:05pm

Is there a way to add a page that contains the DataObject (Overview)?

Like I have in de backend?

Because I want to list different PDF's files in a folder and show on a page.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

24 September 2009 at 7:30am

Well of course you can display the objects on the frontend, but judging by the topic of your post, you're looking to manage them, as well, and I don't believe that will work at this point. You can try it, though. Just put a DOM in a custom form and see what happens.

Avatar
Stijn

Community Member, 46 Posts

24 September 2009 at 7:47am

Hi UncleCheese,

I just what to show them, no managing. The managing will be happen in the backend.

Do you have an example for showing them? Or is that custom?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

24 September 2009 at 7:55am

Well that's easy enough..

<ul>
<% control MyObjects %>
<li>$Title $SomeOtherField</li>
<% end_control %>
</ul>

Maybe I'm missing something, but if you give me a clearer idea of what you're dealing with, I can help you out. Whatever you're trying to do I'm sure is very easy. This is what Silverstripe is built to do.

Avatar
Stijn

Community Member, 46 Posts

24 September 2009 at 7:59am

Isnt it possible to use the controllers of the backend? Because I want exactly what there will be used in the backend (reading of the files in a folder)

Avatar
UncleCheese

Forum Moderator, 4102 Posts

24 September 2009 at 8:23am

so..

function FilesInFolder($folder_name) {
return Folder::findOrMake($folder_name)->Children();
}

<ul>
<% control FilesInFolder(foo) %>
<li><a href="$URL">$Title</li>
<% end_control %>
</ul>

Avatar
Stijn

Community Member, 46 Posts

24 September 2009 at 8:50am

Wow nice thanks!!