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.
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
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.
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.
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?
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.
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)
so..
function FilesInFolder($folder_name) {
return Folder::findOrMake($folder_name)->Children();
}
<ul>
<% control FilesInFolder(foo) %>
<li><a href="$URL">$Title</li>
<% end_control %>
</ul>
Wow nice thanks!!