Where 1234 is the node id for each category in the tree which under I have folders for each year, then the news items.
Until now U9 - U14 it worked well.
Now after upgrading to U15 this code doesn't show the correct node. It doesn't shows the right new items. It suddenly shows items from 2015 for example.
If I want to get the latest one, I need to put for each category the ID of 2024.
But I don't want to do it, because , like what - now every year I'll have to update manually the code with the new id for the year ??
Until now I didn't have to do it
What have been changed in U15 that it messed my website?
Have you tried using OrderByDescending to sort the nodes by their created or updated date? OrderByDescending will ensure the latest nodes are listed first.
V15 - Mess my home page - weird issue with getting nodes from tree
Hi,
In my home page I'm taking the latest nodes in the tree for each section.
My website is a news site.
So for example, my tree looks something like:
Magazine
So every time I'm adding a new item, it will automatically shows in home page for each section - like, the latest news.
The code looks something like:
Where 1234 is the node id for each category in the tree which under I have folders for each year, then the news items.
Until now U9 - U14 it worked well.
Now after upgrading to U15 this code doesn't show the correct node. It doesn't shows the right new items. It suddenly shows items from 2015 for example.
If I want to get the latest one, I need to put for each category the ID of 2024.
But I don't want to do it, because , like what - now every year I'll have to update manually the code with the new id for the year ??
Until now I didn't have to do it
What have been changed in U15 that it messed my website?
And how to fix it.
Thanks
Hi,
Have you tried using OrderByDescending to sort the nodes by their created or updated date? OrderByDescending will ensure the latest nodes are listed first.
For example:
Thanks,
When I did
OrderByDescending(x=>x.CreateDate)
it gave me the first item in the tree (somewhere in 2013 ..),but somehow
OrderBy(x=>x.CreateDate)
worksThanks.
P. S
I thought it's Umbraco helper, apparently it just a standard command at LinQ ...
is working on a reply...