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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

$Date.Nice


Reply


2 Posts   2059 Views

Avatar
vetoo

Community Member, 2 Posts

3 May 2007 at 7:56am

Hi all,
I have added the article pages & holder, for some reason I have no dates on my holder or article pages, if I remove the .Nice from $Date.Nice I get a date, but its not very nice...

any ideas why $Date.Nice is not working?

Avatar
Sean

Forum Moderator, 922 Posts

3 May 2007 at 10:13am

Edited: 03/05/2007 10:14am

Have you set the Date using a Date field for the $db array? And using the DateField object for your date?

eg.

static $db = array(
'Date' => 'Date'
);

function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new DateField('Date', 'Date'), 'Content');
}