Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (9 sloc) 288 Bytes
<?php
class RecentBlogPosts extends Widget{
static $title = "Recent Posts";
static $cmsTitle = "Recent Blog Posts";
static $description = "List recent posts for this blog.";
function Posts($num=5) {
return DataObject::get("BlogEntry", "", "Date DESC","", $num);
}
}