I have testimonial from various clients. now i want to so last added testimonial first. But i could not know, how can i order by it. I have created nested content (as element).
My partial code is as following. I could not get my element under Modal.Contnet.Childern. It will be shows as separate entities.
var AllSlider = Model.Content.Value<>
Please can you assist or provide the details about the way to achieve this?
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using Umbraco.Web.Models
@{
var AllSlider = Model.Content.Value<>
}
@if (AllSlider != null)
{
foreach (IPublishedElement slide in AllSlider.Where(x => x.IsVisible()))
{
string title = slide.Value<string>("slideTitle");
string subtitle = slide.Value<string>("slideSubtitle");
var img = slide.Value<MediaWithCrops>("slideImage");
var link = slide.Value<Link>("slideLink");
var linkVideo = slide.Value<Link>("slideVideo");
var videoLink = "";
if (linkVideo != null)
{
videoLink = @linkVideo.Url;
}
// my html code here.
Render Nested Element by order
I have testimonial from various clients. now i want to so last added testimonial first. But i could not know, how can i order by it. I have created nested content (as element).
My partial code is as following. I could not get my element under Modal.Contnet.Childern. It will be shows as separate entities.
var AllSlider = Model.Content.Value<>
Please can you assist or provide the details about the way to achieve this?
@inherits Umbraco.Web.Macros.PartialViewMacroPage
@using Umbraco.Web.Models
@{
var AllSlider = Model.Content.Value<>
}
@if (AllSlider != null) {
} }
is working on a reply...