Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » ModelAdmin and Frontend Integration

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

Page: 1
Go to End
Author Topic: 1482 Views
  • teejay
    Avatar
    Community Member
    63 Posts

    ModelAdmin and Frontend Integration Link to this post

    Hi guys. I have played a little bit around with model admin, and yeah I think its a really cool feature. I have just on problem. How can i display my data on a page in the frontend ?

    THX a lot

    Thomas

  • teejay
    Avatar
    Community Member
    63 Posts

    Re: ModelAdmin and Frontend Integration Link to this post

    Ok ok think first before posting. Just create a new page and add a custom query to the controller

    function TestQuery (){
       $list = DataObject::get('Product');
       return $list;
    }

    <% control TestQuery %>
       <p>$Name ... $Category.Title</p>
    <% end_control %>

    and it works like a charm

    1482 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.