17688 Posts in 4607 Topics by 2180 members
General Questions
SilverStripe Forums » General Questions » Latest News
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 832 Views |
-
Latest News

25 March 2009 at 6:32am
Why does the tutorial for how to get latest news on the homepage not work?
function LatestNews($num=5) {
$news = DataObject::get_one("ArticleHolder");
return ($news) ? DataObject::get("ArticlePage", "ParentID = '$news->ID'", "Date DESC", "", $num) : false;
} -
Re: Latest News

25 March 2009 at 5:30pm
It would help if you told everyone what it is doing wrong or even better, what error is being displayed.
Cheers
Aaron -
Re: Latest News

18 February 2010 at 9:47pm
Hi all,
I am having problems with the latest new tut.
I have gone through the tut, but when I go to the homepage of the site get an error about the SQL query....
[User Error] Couldn't run query: SELECT `SiteTree_Live`.*, `Page_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName FROM `SiteTree_Live` LEFT JOIN `Page_Live` ON `Page_Live`.ID = `SiteTree_Live`.ID WHERE (ParentID = 18) AND (`SiteTree_Live`.ClassName IN ('ArticlePage')) ORDER BY Date DESC LIMIT 5 Unknown column 'Date' in 'order clause'
Any ideas would be gratefully received!
-
Re: Latest News

18 February 2010 at 9:55pm
Fixed it!
It was trying to order by date, which I didn't have in the db.
| 832 Views | ||
|
Page:
1
|
Go to Top |


