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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DataObjectManager in Frontend


Reply


7 Posts   1397 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, 4094 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, 4094 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, 4094 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!!