Posted on 06/11/2018 10:17:19
Coming right up:
@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
<div class="categories">
<div class="container">
@{
var groups = GetLoop("Groups");
if (groups.Count != 0)
{
<div class="row">
@foreach (var grp in groups)
{
if (grp.GetBoolean("Ecom:Group.NavigationShowInMenu"))
{
string image = grp.GetString("Ecom:Group.LargeImage");
string imageResize = VestjyskMarketing.Helpers.ImageHelper.ResizeImage(image, 230, 140);
string groupUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(grp.GetString("Ecom:Group.Link.Clean"));
<div class="col-xs-12 col-sm-4 col-md-3">
<div class="categories__item">
<a class="categories__item__link" href="@groupUrl" title="@grp.GetString("Ecom:Group.Name")">
<div class="categories__item__imagewrapper">
<img class="img-responsive categories__item__imagewrapper__image" alt="@grp.GetString("Ecom:Group.Name")" src="@imageResize" />
</div>
<div class="categories__item__name">
@grp.GetString("Ecom:Group.Name")
</div>
</a>
</div>
</div>
}
}
</div>
}
}
</div>
</div>