@using Sitecore.Mvc;
@using Sitecore.Data.Items;
@using Sitecore.XA.Foundation.MarkupDecorator.Extensions;
@using Sitecore.XA.Foundation.RenderingVariants.Extensions;
@using Sitecore.XA.Foundation.SitecoreExtensions.Extensions;
@using Sitecore.XA.Foundation.Variants.Abstractions.Fields;
@model Sitecore.XA.Foundation.RenderingVariants.Models.VariantListsRenderingModel
@Html.Sitecore().Field("Title")
@if (Model.Rendering.DataSourceItem == null)
{
@Model.MessageIsEmpty
}
@if (!Model.Items.Any() && Model.Rendering.DataSourceItem != null)
{
using (Html.Sxa().BeginEditFrame(Html.Sitecore().CurrentRendering.DataSource, "Carousel Empty", Model.IsControlEditable))
{
@Model.MessageIsEmpty
}
}
@foreach (Item item in @Model.Items)
{
-
@using (Html.Sxa().BeginEditFrame(item.ID.ToString(), "Carousel Slider", Model.IsControlEditable))
{
foreach (BaseVariantField variantField in Model.VariantFields)
{
@Html.RenderingVariants().RenderVariant(variantField, item, Model.RenderingWebEditingParams, Model)
}
}
}
@foreach (Item item in @Model.Items)
{
-
@using (Html.Sxa().BeginEditFrame(item.ID.ToString(), "Carousel Slider", Model.IsControlEditable))
{
foreach (BaseVariantField variantField in Model.VariantFields)
{
@Html.RenderingVariants().RenderVariant(variantField, item, Model.RenderingWebEditingParams, Model)
}
}
}