Login | Forgot password | Register
What is OpenID?
OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.
With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.
For more information visit the official OpenID site.
Data Model Questions
SilverStripe Forums » Data Model Questions » Sort ComplexTableField in the CMS
|
Page:
1
|
Go to End | |
| Author | Topic: Sort ComplexTableField in the CMS | 457 Views |
-
Sort ComplexTableField in the CMS

22 June 2009 at 2:41am Last edited: 22 June 2009 9:35am
Hi,
I've got a simple news section made with DataObjects. Everything works fine, I just want to sort the entries by date.
$newsTable = new ComplexTableField(
$this,
'NewsArticles',
'NewsArticle',
array(
'ArticleDate' => 'Article Date',
'ArticleTitle' => 'Article Title'
),
null
);Can anyone give me a hint? Thanks!
-
Re: Sort ComplexTableField in the CMS

22 June 2009 at 9:34am Last edited: 22 June 2009 9:34am
Ahhh, that's how it works:
$newsTable = new ComplexTableField(
$this,
'NewsArticles',
'NewsArticle',
array(
'ArticleDate' => 'Article Date',
'ArticleTitle' => 'Article Title'
),
null,
null,
'ArticleDate DESC'
);
| 457 Views | ||
|
Page:
1
|
Go to Top |
Currently Online: mtz, Euphemismus, stx333
Welcome to our latest member: mr-andrew

