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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

FileDataObjectManager - question?


Go to End


30 Posts   5541 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

21 May 2009 at 2:30am

$Attachment.Created will work, too.

Avatar
ulysses

Community Member, 57 Posts

21 May 2009 at 2:34am

To display the Date, I had to add it in. For Created, do you need to have the extra date field or will it be automatically displayed if you have the $Attachment.Created variable for display?

Avatar
ulysses

Community Member, 57 Posts

21 May 2009 at 2:38am

Edited: 21/05/2009 2:44am

For every resource I add, there appears to be a blank line above the record display on the front end page.

Any idea why?

Update: I had the Layout div repeated inside another Layout div. All sorted.

Avatar
ulysses

Community Member, 57 Posts

21 May 2009 at 2:48am

Sweet. That is exactly what I needed. Can the displayed date be formatted?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

21 May 2009 at 2:59am

No, the Created property is built into every object.

<% control Attachement %>$Created.Nice<% end_control %>
<% control Attachement %>$Created.Format(m-d-y)<% end_control %>

etc...

More in the SS docs on date formatting.

Avatar
ulysses

Community Member, 57 Posts

21 May 2009 at 3:04am

Brilliant. This is cool. Thanks UncleCheese.

Go to Top