Skip to content

Instantly share code, notes, and snippets.

@websterian
Created May 11, 2018 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save websterian/17c3df69ec1c4b98d597ffca9171c918 to your computer and use it in GitHub Desktop.
Save websterian/17c3df69ec1c4b98d597ffca9171c918 to your computer and use it in GitHub Desktop.
@using Sitecore.XA.Foundation.MarkupDecorator.Extensions
@using Sitecore.XA.Foundation.SitecoreExtensions.Extensions
@using Sitecore.Commerce.XA.Feature.Catalog.Models
@using Sitecore.Commerce.XA.Foundation.Common.ExtensionMethods;
@model Sitecore.Services.Examples.Feature.Catalog.Website.Models.CatalogItemRenderingModel
@{
if (Model == null)
{
return;
}
}
<div @Html.Sxa().Component("cxa-productinformation-component", Model.Attributes)>
@if (!String.IsNullOrWhiteSpace(Model.ErrorMessage))
{
<div class="error-message">
@Model.ErrorMessage
</div>
}
else
{
<div class="product-info component-content">
<div class="product-name">
<h1 id="displayName">@Model.DisplayNameRender</h1>
</div>
<div class="product-number">
<p>
@Html.Sitecore().Field("Item Number", Html.Sitecore().CurrentItem)
<span class="itemNumber">@Model.RenderField("ItemNumber")</span>
</p>
</div>
<div class="product-description">
<h6>@Html.Sitecore().Field("Description", Html.Sitecore().CurrentItem)</h6>
<p class="description">@Model.DescriptionRender</p>
</div>
<div class="product-features" id="features">
@Model.Features
</div>
<div class="product-warrantyinformation" id="warrantyinformation">
@Model.WarrantyInformation
</div>
</div>
}
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment