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.

Customising the CMS

Basic CMS Customization Question


2 Posts   1069 Views


22 January 2010 at 11:05am Community Member, 41 Posts

Hi all,

I've been trying to get this working to no avail, but basically what I'm wanting to do is this:

This is the basic data-model surrounding my question

class Ticket extends DataObject {
static $has_many = array(
      'Messages' => 'Message'

I'm trying to figure out how to get a custom CMS page working that allows me to see a list of Tickets, then click on a ticket, and in, show the Messages for that ticket, along with a form to add a new message.

What I have so far is TicketAdmin.php, TicketAdmin_left and _right template files, and a method for Show in my controller that allows for /admin/ticket/show/$ID (and just returns the ID).

In my template, I have the code for the list of tickets. Something like:

<% if Tickets %>
      <% control Tickets %>
         <li><a href="admin/ticket/show/$ID">$Subject</a></li>
      <% end_control %>
<% end_if %>

When I go that URL though, it doesn't render in my TicketAdmin_right template, it just renders on a blank page. What template do I need to create to have it show up in the nicely formatted template? I'm trying to accomplish something similar to the attached image when I click on a particular ticket

Attached Files

22 January 2010 at 7:23pm Community Member, 105 Posts

You might able to use ModelAdmin it isn't very easy to create CMS modules from my experience