Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Custom Report Show Record

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

Page: 1
Go to End
Author Topic: 917 Views
  • Blackdog
    Avatar
    Community Member
    156 Posts

    Custom Report Show Record Link to this post

    I am currently writing a custom report for a client who wishes to track records which are stored in a DataObject.

    Is there an inbuilt function which can display this information in a popup window similar to that of a getCMSFields_forPopup()?

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Custom Report Show Record Link to this post

    Hi Blackdog,

    I don't follow... do you want to create a popup window or are you asking how to modify the edit fields... I've searched for getCMSFields_forPopup and cannot find the method... which version of ss are you using?

  • Blackdog
    Avatar
    Community Member
    156 Posts

    Re: Custom Report Show Record Link to this post

    Hey Swaiba,

    Just display the report records in a popup window.

    Not using the getCMSFields_forPopup, just creating a popup which acts the same way as that.

    cheers.

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Custom Report Show Record Link to this post

    Well since I could not find the method you wish to emulate, I cannot know what it does... however if all you want is a popup box that lists records...

    then this will describe a coule bo methods of getting a popup window...
    http://www.silverstripe.org/form-questions/show/293061?start=0#post293068

    then you can create a page that has something like this in the controller...

    function GetRecords()
    {
    return DataObject::get('RecordName',<where clause>);
    }

    and this in the template...

    <% if GetRecords %>
    <% control GetRecords %>
    $FieldInRecord - $AnotherFieldInRecord - $YetAnotherFieldInRecord
    <% end_control %>
    <% end_if %>

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