Developer forum

Forum » Templates » Getting CreateDate from Item

Getting CreateDate from Item

Casper Andersen
Reply

Hello

I am trying to get stuff like create date, update date and so on, basically i have a page, the page has a paragraph with a module on it that gets a set of news items, there is a list that displays each news item- So far so good,

But i want to get each news items, create dat and update date, but i cant seem to get that information, i try using my 

<!--@DwTemplateTags--> 
  <!--@LoopStart(ItemPublisher:Items.List)-->
<!--@DwTemplateTags-->  
  <!--@LoopEnd(ItemPublisher:Items.List)-->

inside my list.cshtml file but dont get the information i need

Thanks a lot for any help provided


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Casper

You should add a field on the item type with a datetime with a default value of now.

BR Nicolai

 

You must be logged in to post in the forum