Hi mate,
Surely this isn't much different from how your navigation is built.
I do something similar, but it's a featured page (a tour). Only one, but I have access to everything to do with that page - teaser, images etc.
Maybe you can adapt this:
HomePage.php
class HomePage_Controller extends Page_Controller {
// Get featured tour data
function getFeaturedTour() {
//return DataObject::get_one('Tour');
return DataObject::get_one('Tour', 'TourLengthDays>0', false, 'RAND()');
}
}
Where 'Tour' is the type of page. You probably want to use get instead of get_one, but I can't find it in the docs.
HomePage.ss
<% control getFeaturedTour %>
<div class="featured">
<div class="featured-top">
<div class="featured-btm">
<h4>Featured Tour</h4>
<a href="$Link">
$Photo2.SetWidth(205)
</a>
<h5 style="margin: 0px">
<a href="$Link" style="color:#023107">$Title</a>
<small>$TourLeavesFrom to $TourEndsAt - $TourLengthDays Days</small>
</h5>
<% if TourTeaser %>
<div style="font-weight: normal; text-align: justify; margin-right: 5px">$TourTeaser</div>
<p><a href="$Link">Click for details</a></p>
<% end_if %>
</div>
</div>
</div>
<% end_control %>
As you can see, I have access to all fields in the Page type.
Maybe a start. There may be an easier way with 2.3. The above is for 2.2.3
Cheers
Aaron