3212 Posts in 847 Topics by 809 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 910 Views |
-
Latest News show all in News section

29 September 2010 at 5:35am
I am using and Article Holder to show the latest news for a website, but I only wish to show the first three. Right now it is showing every article in the News section.
Is there anyway to only show the first 3?
-
Re: Latest News show all in News section

29 September 2010 at 2:42pm
function LatestNews($num=3) {
$news = DataObject::get_one("ArticleHolder");
return ($news) ? DataObject::get("ArticlePage", "ParentID = $news->ID", "Date DESC", "", $num) : false;
}<% control LatestNews %>
$Content
<% end_control %>
| 910 Views | ||
|
Page:
1
|
Go to Top |


