Hi,
i'm new to SS but i like it.
In my first training-Project I handle 2 Models within Admin an new Page Type.
Event, Location
(Event has_one Location)
Works Perfectly.
In detail-view i would like to fetch the details of the Event including the details of the Location
Controller:
function details()
{
$event_id = (int)Director::urlParam('ID');
$event = DataObject::get_by_id('Event', $event_id);
/.......
}
[/code}
View:
<% if Eventdetails %>
<dl>
<% control Eventdetails %>
<!-- Data from Model "Event" -->
<dt>Datum:</dt><dd>$Date.Format(d.m.Y)</dd>
<dt>Start:</dt><dd>$Start</dd>
<dt>Ende:</dt><dd>$End</dd>
<!-- Additional Info from Model "Location" should go here -->
<dt>Street:</dt><dd>$Street</dd>
<dt>Zip:</dt><dd>$Zip</dd>
<dt>Phone:</dt><dd>$Phone</dd>
<% end_control %>
</dl>
<% end_if %>