Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Show Created date in model admin lists


Go to End


4 Posts   2963 Views

Avatar
updog

Community Member, 13 Posts

9 January 2012 at 11:08pm

How do i do this, I have tried adding 'Created' to the $summary_fields array.

Avatar
swaiba

Forum Moderator, 1899 Posts

10 January 2012 at 4:32am

Avatar
updog

Community Member, 13 Posts

11 January 2012 at 4:28pm

Are you able to provide an example?

All I am looking to do is show the Created and LastEdited columns in a model admin search results table.

Avatar
swaiba

Forum Moderator, 1899 Posts

11 January 2012 at 10:24pm

	public static $summary_fields = array (
		'CreatedText',
	);

	static $casting = array("CreatedText" => "Text");

	public function CreatedText() {
		return $this->Created;
	}

(note:untested)