hi
simple problem
how to get title from DataObject::get ?
function a() {
$x = DataObject::get("SiteTree");
return $x->Title;
}
doesnt work
EDIT:
function a() {
$x = DataObject::get("SiteTree");
foreach($x as $y) {
echo '<p>' . $y->Title . ' ' . $y->URLSegment . '</p>';
}
}