Listing news articles ... my code works ... need help changing the starting point from the 4th article not the 1st article
I have a partial view calling-rendering the first 3 news articles using this code:
var newsItems = CurrentPage.Site().FirstChild("articlesMain").Children("articlesItem").Where("Visible").OrderBy("CreateDate descending").Take(3);
I'm trying to reuse this same code to render 4 smaller items below it pulling from the same list of articles as the line of code above. How can I pick-change the point where this starts from the 1st to the 4th item in the newsItems list?
Listing news articles ... my code works ... need help changing the starting point from the 4th article not the 1st article
I have a partial view calling-rendering the first 3 news articles using this code:
I'm trying to reuse this same code to render 4 smaller items below it pulling from the same list of articles as the line of code above. How can I pick-change the point where this starts from the 1st to the 4th item in the newsItems list?
Appreciate the help!
Hi Brett
You code but strongly typed will look like:
It will return items except first 3. Also strongly typed is better than dynamics.
Thanks,
Alex
Thanks Alex ... huge help (as always).
I'm still learning and at a break-neck pace ... Do you know of any good references for MVC you could recommend? If it's not too much trouble.
Thanks again, man ... really appreciate it.
Highly recommend you read at least 5 times Common Pitfalls article - https://our.umbraco.org/documentation/reference/Common-Pitfalls/
Here is really good resource about Umbraco - https://github.com/kgiszewski/LearnUmbraco7
And documentation of course and Umbraco TV but I think you already know it.
Have a great weekend,
Alex
Perfect! I really appreciate the info ... thanks again.
is working on a reply...