Hello,
I'm trying to get the latest blog entries from a specific blogholder, to be shown inside another blogholder using this code:
class BlogHolderDecorator extends DataExtension {
public function latestNews($max) {
$holder = DataList::create('BlogHolder')->filter('URLSegment', 'blog');
return DataList::create('BlogEntry')->filter('ParentID', $holderID)->limit($max);
}
}
in BlogHolder.ss I have:
<% loop latestNews('5') %>
<li>
<h4>$Title</h4>
<p>$Content.FirstParagraph(html)</p>
</li>
<% end_loop%>
This doesn't work yet.. any idea what I'm missing here?
Thanks