Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DataObjectManager in Frontend

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 1320 Views
  • Stijn
    Avatar
    Community Member
    46 Posts

    DataObjectManager in Frontend Link to this post

    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.

  • UncleCheese
    Avatar
    4085 Posts

    Re: DataObjectManager in Frontend Link to this post

    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.

  • Stijn
    Avatar
    Community Member
    46 Posts

    Re: DataObjectManager in Frontend Link to this post

    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?

  • UncleCheese
    Avatar
    4085 Posts

    Re: DataObjectManager in Frontend Link to this post

    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.

  • Stijn
    Avatar
    Community Member
    46 Posts

    Re: DataObjectManager in Frontend Link to this post

    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)

  • UncleCheese
    Avatar
    4085 Posts

    Re: DataObjectManager in Frontend Link to this post

    so..

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

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

  • Stijn
    Avatar
    Community Member
    46 Posts

    Re: DataObjectManager in Frontend Link to this post

    Wow nice thanks!!

    1320 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.