Hi Folk
I have the following function:
class eventsPage_Controller extends Page_Controller {
public function eventsItems() {
$Events = DataObject::get("eventSubmissionDataObject", "ID > 0 ", "EventDate DESC");
return $Events;
}
}
I access this on my template using the following:
<% control eventsItems %>
<li>
<div class="eventDate">$EventDate</div>
</li>
<% end_control %>
Works a treat. However, I would like to manipulate the data in this $Events object (i.e. the individual fields) such as EventDate and then return an html snippet rather than using the method above.
Can you tell me how to do this?
Thanks a million
Nicolaas