I'm fairly new to Umbraco and inherited a client's website built by a different agency. I am having problems with a Template that is not working properly. The website has a "Latest News" page that is supposed to list news releases in chronological order. In the staging environment, there is a date function that can let me set the news release posting date. However, even if I set the date in the staging environment, the live site lists all postings with one date: 01/01/01.
Unfortunately without seeing what the code looks like in your template/controller it's hard to gauge what the problem could be. There are lots of reasons for why the date might not be showing or why the sorting might not be working correctly.
var itemParent = Model.AncestorOrSelf<NewsListingPage>();
var items = itemParent.Children<NewsYear>();
int yearSelected = -1;
bool first = true;
bool newsArticle = false;
Yes, confirmed legit published dates. Plus I posted a new article and reposted old articles, but the date stamp still does not reflect the correct date.
Problem with Template
I'm fairly new to Umbraco and inherited a client's website built by a different agency. I am having problems with a Template that is not working properly. The website has a "Latest News" page that is supposed to list news releases in chronological order. In the staging environment, there is a date function that can let me set the news release posting date. However, even if I set the date in the staging environment, the live site lists all postings with one date: 01/01/01.
Any suggestions on a fix?
Hi Randy,
Unfortunately without seeing what the code looks like in your template/controller it's hard to gauge what the problem could be. There are lots of reasons for why the date might not be showing or why the sorting might not be working correctly.
Are you able to share more?
Thanks
Nik
Here is the code:
@inherits UmbracoViewPage
@{ Layout = "masterPage.cshtml";
}
Media Center
Hi Randy,
Is
PublishedDate
a property that has been added to your NewsArticlePage doc type? If so, can you confirm it's data type?Thanks
Nik
Hi Nik,
Data type is Date Picker.
Thanks, Randy
This may seem silly, but have you confirmed that the articles have legitimate published dates set?
Yes, confirmed legit published dates. Plus I posted a new article and reposted old articles, but the date stamp still does not reflect the correct date.
is working on a reply...