Skip to main content
Error executing template "Designs/keflico/eCom/Productlist/products.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_fbd35bf65cc04287a3719c22e4cf70af.FindTopGroup(Group group) in D:\dynamicweb.net\Solutions\Gotcha\keflico.cloud.dynamicweb-cms.com\Files\Templates\Designs\keflico\eCom\Productlist\products.cshtml:line 499
   at CompiledRazorTemplates.Dynamic.RazorEngine_fbd35bf65cc04287a3719c22e4cf70af.Execute() in D:\dynamicweb.net\Solutions\Gotcha\keflico.cloud.dynamicweb-cms.com\Files\Templates\Designs\keflico\eCom\Productlist\products.cshtml:line 139
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
   at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Web; 2 @using Dynamicweb.Ecommerce; 3 4 @{ 5 string AllProductsPage = Pageview.Area.Item["AllProductsPage"].ToString(); 6 bool isloggedin = false; 7 8 string sortBy = GetString("Ecom:ProductList.SortBy"); 9 string sortOrder = GetString("Ecom:ProductList.SortOrder"); 10 11 bool isStandardSorting = string.IsNullOrWhiteSpace(HttpContext.Current.Request.QueryString["Sortby"]); 12 13 if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Extranet.UserName").ToString())) { 14 isloggedin = true; 15 } 16 } 17 18 <header class="header header-overview module module-sand-light"> 19 <div class="breadcrumbs"> 20 @RenderNavigation(new { 21 StartLevel = 1, 22 EndLevel = 4, 23 ExpandMode = "Pathonly", 24 Template = "breadcrumbs.xslt" 25 }) 26 </div> 27 @if(String.IsNullOrWhiteSpace(GetString("Ecom:ProductList:Page.GroupID"))) { 28 <h1 class="header__title">@Translate("Translate_TopLevelGroup_Headline")</h1> 29 <p>@Translate("Translate_TopLevelGroup_Text")</p> 30 } else { 31 <h1 class="header__title">@GetString("Ecom:Group.Name")</h1> 32 33 if(!String.IsNullOrWhiteSpace(GetString("Ecom:Group.Description"))) { 34 @GetString("Ecom:Group.Description") 35 } 36 } 37 38 </header> 39 40 @if(GetLoop("ProductGroups").Count() > 0 && String.IsNullOrWhiteSpace(GetString("Ecom:ProductList:Page.GroupID"))) { 41 <section class="category-page module module-sand"> 42 <article class="card-list__wrapper"> 43 <a href="@AllProductsPage" class="all-link"> 44 @Translate("Translate_ProductList_SeeAllProducts") 45 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.006 11.031"> 46 <g class="arrow" transform="translate(441 901.014) rotate(180)"> 47 <path class="angle" d="M-17182.074-20447.988l4.809-4.809,4.809,4.809" transform="translate(20875.289 -16281.768) rotate(-90)" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/> 48 <line class="line" x2="17" transform="translate(423.5 895.5)" stroke-linecap="round" stroke-width="1"/> 49 </g> 50 </svg> 51 </a> 52 <ul class="card-list"> 53 @foreach (var group in GetLoop("ProductGroups")) { 54 bool show = group.GetBoolean("Ecom:Group.ShowInMenu"); 55 if(show) { 56 string groupLink = "/Default.aspx?Id=" + Pageview.Page.ID + "&GroupID=" + group.GetString("Ecom:Group.ID"); 57 string groupName = group.GetString("Ecom:Group.Name"); 58 string groupImage = group.GetString("Ecom:Group.LargeImage"); 59 string groupImageLg = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=665&Height=665&Crop=0&Compression=100"; 60 string groupImageMd = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=512&Height=512&Crop=0&Compression=100"; 61 string groupImageSm = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=415&Height=415&Crop=0&Compression=100"; 62 string groupImageDefault = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=620&Height=620&Crop=0&Compression=100"; 63 64 <li class="card-list__card"> 65 <a href="@groupLink" class="card__wrapper"> 66 <picture class="card__picture"> 67 <source srcset="@groupImageLg" media="(min-width: 1536px)"> 68 <source srcset="@groupImageMd" media="(min-width: 992px)"> 69 <source srcset="@groupImageSm" media="(min-width: 768px)"> 70 <img src="@groupImageDefault" alt="@groupName"> 71 </picture> 72 <ul class="card__info-list"> 73 <li class="card__info-list__item"> 74 <span class="info info--large">@groupName</span> 75 </li> 76 </ul> 77 </a> 78 </li> 79 } 80 81 } 82 </ul> 83 </article> 84 </section> 85 } else if(GetLoop("Subgroups").Count() > 0) { 86 var currentGroup = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(GetString("Ecom:Group.ID")); 87 var currentToplevel = FindTopGroup(currentGroup); 88 string allLink = AllProductsPage + "&Group=" + currentGroup.Name; 89 90 <section class="category-page module module-sand"> 91 <article class="card-list__wrapper"> 92 <a href="@allLink" class="all-link"> 93 @Translate("Translate_ProductList_SeeAllProducts") 94 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 19.006 11.031"> 95 <g class="arrow" transform="translate(441 901.014) rotate(180)"> 96 <path class="angle" d="M-17182.074-20447.988l4.809-4.809,4.809,4.809" transform="translate(20875.289 -16281.768) rotate(-90)" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/> 97 <line class="line" x2="17" transform="translate(423.5 895.5)" stroke-linecap="round" stroke-width="1"/> 98 </g> 99 </svg> 100 </a> 101 <ul class="card-list"> 102 @foreach (var group in GetLoop("Subgroups")) { 103 bool show = group.GetBoolean("Ecom:Group.ShowInMenu"); 104 if(show) { 105 string groupLink = "/Default.aspx?Id=" + Pageview.Page.ID + "&GroupID=" + group.GetString("Ecom:Group.ID"); 106 string groupName = group.GetString("Ecom:Group.Name"); 107 string groupImage = group.GetString("Ecom:Group.LargeImage"); 108 string groupImageLg = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=665&Height=665&Crop=0&Compression=100"; 109 string groupImageMd = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=512&Height=512&Crop=0&Compression=100"; 110 string groupImageSm = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=415&Height=415&Crop=0&Compression=100"; 111 string groupImageDefault = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(groupImage) + "&Width=620&Height=620&Crop=0&Compression=100"; 112 113 if(groupName.ToLower().Contains("alle") || groupName.ToLower().Contains("all")) { 114 groupLink = allLink; 115 } 116 117 <li class="card-list__card"> 118 <a href="@groupLink" class="card__wrapper"> 119 <picture class="card__picture"> 120 <source srcset="@groupImageLg" media="(min-width: 1536px)"> 121 <source srcset="@groupImageMd" media="(min-width: 992px)"> 122 <source srcset="@groupImageSm" media="(min-width: 768px)"> 123 <img src="@groupImageDefault" alt="@groupName"> 124 </picture> 125 <ul class="card__info-list"> 126 <li class="card__info-list__item"> 127 <span class="info info--large">@groupName</span> 128 </li> 129 </ul> 130 </a> 131 </li> 132 } 133 } 134 </ul> 135 </article> 136 </section> 137 } else { 138 var currentGroup = Dynamicweb.Ecommerce.Services.ProductGroups.GetGroup(GetString("Ecom:Group.ID")); 139 var currentToplevel = FindTopGroup(currentGroup); 140 141 <section class="module module-sand product-overview"> 142 <aside id="productFilters" class="filter-section" data-group="@currentGroup.Id" data-top-group="@currentToplevel.Name" data-all="false"> 143 <div class="filter-section__header"> 144 <h3>@Translate("Translate_ProductList_FilterHeadline")</h3> 145 146 <div class="filter-section__exit" id="filter-article-close"> 147 <svg xmlns="http://www.w3.org/2000/svg" width="10.819" height="10.819" viewBox="0 0 10.819 10.819"> 148 <g id="Group_1017" data-name="Group 1017" transform="translate(-1.591 2.559)"> 149 <rect id="Rectangle_702" data-name="Rectangle 702" width="14" height="1.3" rx="0.65" transform="translate(1.591 7.341) rotate(-45)"/> 150 <rect id="Rectangle_703" data-name="Rectangle 703" width="14" height="1.3" rx="0.65" transform="translate(2.51 -2.559) rotate(45)"/> 151 </g> 152 </svg> 153 </div> 154 </div> 155 <ul v-if="showFilters" class="filter-section__filter-list"> 156 <li v-for="facet in facets" v-if="((facet.QueryParameter != 'Group' && currentGroup && !allProducts) || allProducts) && sortedOptions(facet.Options).length > 1" :class="'filter-item filter-item--' + facet.RenderType.toLowerCase()"> 157 <template v-if="facet.RenderType.toLowerCase() != 'range'"> 158 <input class="filter-item__checkbox-toggle" type="checkbox" :id="facet.QueryParameter" aria-checked="true"> 159 <label class="filter-item__header" :for="facet.QueryParameter"> 160 <span class="filter-item__header__title">{{ translation('Translate_ProductList_Filter_' + facet.QueryParameter) }}</span> 161 </label> 162 </template> 163 164 <div class="filter-item__body"> 165 <ul class="filter-item__input-list"> 166 <template v-if="facet.RenderType.toLowerCase() == 'range'"> 167 <li class="input-list__filter"> 168 <label for="filter-length">{{ translation('Translate_ProductList_Filter_' + facet.QueryParameter.replace('Start', '')) }}</label> 169 <div class="duo-range-slider"> 170 <input class="duo-range-slider__range filter-option" :data-name="facet.QueryParameter" :name="facet.QueryParameter" :value="getLowestValue(facet.Options)" :min="getLowestValue(facet.Options)" :max="getHighestValue(facet.Options)" step="1" type="range"> 171 <input class="duo-range-slider__range filter-option" :data-name="facet.QueryParameter.replace('Start', 'End')" :name="facet.QueryParameter.replace('Start', 'End')" :value="getHighestValue(facet.Options)" :min="getLowestValue(facet.Options)" :max="getHighestValue(facet.Options)" step="1" type="range"> 172 <div class="duo-range-slider__values"> 173 <div class="duo-range-slider__values-min"><span>{{ facet.Options[0].Value }}</span> mm</div> 174 <div class="duo-range-slider__values-max"><span>{{ facet.Options.at(-1).Value }}</span> mm</div> 175 </div> 176 </div> 177 </li> 178 </template> 179 <template v-else-if="facet.RenderType.toLowerCase() == 'select'"> 180 <li class="input-list__filter"> 181 <div class="search-select"> 182 <div class="search-select__search"> 183 <input class="search-select__search-input" type="search" :placeholder="translation('Translate_General_SearchFor') + ' ' + translation('Translate_ProductList_Filter_' + facet.QueryParameter)"> 184 <button class="search-select__search-clear" type="button">@Translate("Translate_Close")</button> 185 </div> 186 <div class="search-select__dropdown"> 187 <label v-for="option in sortedOptions(facet.Options)" class="search-select__dropdown-item" :for="option.Value">{{ option.Value }}</label> 188 </div> 189 <div class="search-select__tags"> 190 <template v-for="option in sortedOptions(facet.Options)"> 191 <input type="checkbox" class="filter-option" :data-name="facet.QueryParameter" :name="facet.QueryParameter + stringAddition(facet.QueryParameterType)" :value="option.Value" :id="option.Value"> 192 <label :for="option.Value">{{ option.Label }}</label> 193 </template> 194 </div> 195 </div> 196 </li> 197 </template> 198 <template v-else> 199 <li class="input-list__filter"> 200 <div v-for="option in sortedOptions(facet.Options)" class="form__fieldset"> 201 <div class="form__field-wrap"> 202 <input type="checkbox" class="form__field form__field--checkbox filter-option" :data-name="facet.QueryParameter" :name="facet.QueryParameter + stringAddition(facet.QueryParameterType)" :value="option.Value" :id="option.Value"> 203 <label :for="option.Value">{{ option.Label }}</label> 204 </div> 205 </div> 206 </li> 207 </template> 208 </ul> 209 </div> 210 </li> 211 </ul> 212 <div class="filter-section__footer"> 213 <div class="footer-controls"> 214 <button id="clearFilterButton" class="btn btn-link">@Translate("Translate_ProductList_ResetFilters")</button> 215 <button id="applyFilterButton" class="btn btn-secondary btn--small">@Translate("Translate_ProductList_ApplyFilters")</button> 216 </div> 217 </div> 218 </aside> 219 <article class="card-list__wrapper"> 220 <div class="card-list__header"> 221 <div class="form__fieldset mobile-only"> 222 <button class="btn btn-secondary" id="toggle-filter-btn"> 223 @Translate("Translate_Filter") 224 </button> 225 </div> 226 <div class="form__fieldset"> 227 <label for="sorting" class="select-label">@Translate("Translate_ProductList_SortBy")</label> 228 <select class="form__field--narrow form__field-wrap--select" id="sorting"> 229 <option value="default">@Translate("Translate_ProductList_SortOption_Highlighted")</option> 230 <option value="asc"@(!isStandardSorting && sortOrder.ToLower() == "asc" ? "selected" : "")>@Translate("Translate_ProductList_SortOption_Alphabetic")</option> 231 <option value="desc" @(!isStandardSorting && sortOrder.ToLower() == "desc" ? "selected" : "")>@Translate("Translate_ProductList_SortOption_ReverseAlpabetic")</option> 232 </select> 233 </div> 234 </div> 235 <ul class="card-list"> 236 @foreach(var product in GetLoop("Products")) { 237 string link = product.GetString("Ecom:Product.Link.Clean"); 238 string name = product.GetString("Ecom:Product.Name"); 239 string teaser = product.GetString("Ecom:Product:Field.Name2.Value.Clean"); 240 string productNumber = product.GetString("Ecom:Product.Number"); 241 string dbNumberLabel = product.GetString("Ecom:Product:Field.ProductDbNumber.Name"); 242 string dbNumber = product.GetString("Ecom:Product:Field.ProductDbNumber.Value"); 243 string primaryGroup = product.GetString("Ecom:Product.PrimaryGroupID").ToLower(); 244 var productLayout = !string.IsNullOrWhiteSpace(product.GetString("Ecom:Product:Field.ProductLayout")) ? product.GetString("Ecom:Product:Field.ProductLayout") : primaryGroup; 245 246 bool isBundleOnly = System.Convert.ToBoolean(product.GetString("Ecom:Product:Field.BundleOnly")); 247 248 string primaryPrice = product.GetString("Ecom:Product.Price.PriceWithoutVAT"); 249 string secondaryPrice = ""; 250 string tertiaryPrice = ""; 251 string primaryPriceDescription = ""; 252 string secondaryPriceDescription = ""; 253 string tertiaryPriceDescription = ""; 254 255 string priceCurrencySymbol = product.GetString("Ecom:Product.Currency.Symbol"); 256 string salesUnit = product.GetString("Ecom:Product.DefaultUnitName").ToLower(); 257 string salesUnitCode = product.GetString("Ecom:Product:Field.ProductLengthUnitCode"); 258 259 string productImage = product.GetString("Ecom:Product.ImageDefault.Clean"); 260 string productImageLg = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(productImage) + "&Width=416&Height=371&Crop=0&Compression=100"; 261 string productImageMd = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(productImage) + "&Width=310&Height=277&Crop=0&Compression=100"; 262 string productImageSm = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(productImage) + "&Width=230&Height=205&Crop=0&Compression=100"; 263 string productImageDefault = "/admin/public/getimage.ashx?Image=" + HttpUtility.UrlEncode(productImage) + "&Width=340&Height=304&Crop=0&Compression=100"; 264 265 switch(productLayout) { 266 case "group1": 267 if(isBundleOnly) { 268 primaryPrice = ""; 269 } 270 271 secondaryPrice = product.GetString("Ecom:Product:Field.ProductPriceBundle.Value").Replace(",", "-").Replace(".", ",").Replace("-", "."); 272 273 primaryPriceDescription = Translate("Translate_ProductDecription_Hardwood_Anbrud"); 274 secondaryPriceDescription = Translate("Translate_ProductDecription_Hardwood_Bundt"); 275 276 if(secondaryPrice.Contains(",")) { 277 string[] sp = secondaryPrice.Split(','); 278 279 if(sp[1].Length == 1) { 280 secondaryPrice += "0"; 281 } 282 } else { 283 secondaryPrice += ",00"; 284 } 285 286 break; 287 288 case "group32": 289 secondaryPrice = product.GetString("Ecom:Product:Field.ProductPriceAbove100SQM"); 290 291 primaryPriceDescription = Translate("Translate_ProductDecription_Terrase_Anbrud"); 292 secondaryPriceDescription = Translate("Translate_ProductDecription_Terrase_Above"); 293 294 if(secondaryPrice.Contains(",")) { 295 string[] sp = secondaryPrice.Split(','); 296 297 if(sp[1].Length == 1) { 298 secondaryPrice += "0"; 299 } 300 } else { 301 secondaryPrice += ",00"; 302 } 303 304 break; 305 306 case "group73": 307 secondaryPrice = product.GetString("Ecom:Product:Field.ProductPriceAbove100SQM"); 308 tertiaryPrice = product.GetString("Ecom:Product:Field.ProductPriceAbove3000M.Value").Replace(".", ","); 309 310 primaryPriceDescription = Translate("Translate_ProductDecription_Facade_Under1000"); 311 secondaryPriceDescription = Translate("Translate_ProductDecription_Facade_Between1000and3000"); 312 tertiaryPriceDescription = Translate("Translate_ProductDecription_Facade_Above3000"); 313 314 if(secondaryPrice.Contains(",")) { 315 string[] sp = secondaryPrice.Split(','); 316 317 if(sp[1].Length == 1) { 318 secondaryPrice += "0"; 319 } 320 } else { 321 secondaryPrice += ",00"; 322 } 323 324 if(tertiaryPrice.Contains(",")) { 325 string[] tp = tertiaryPrice.Split(','); 326 327 if(tp[1].Length == 1) { 328 tertiaryPrice += "0"; 329 } 330 } else { 331 tertiaryPrice += ",00"; 332 } 333 334 break; 335 336 case "group52": 337 case "group66": 338 secondaryPrice = product.GetString("Ecom:Product:Field.ProductPriceHalfParcel").Replace(",", "-").Replace(".", ",").Replace("-", "."); 339 tertiaryPrice = product.GetString("Ecom:Product:Field.ProductPriceCompleteParcel").Replace(",", "-").Replace(".", ",").Replace("-", "."); 340 341 primaryPriceDescription = Translate("Translate_ProductDecription_Plader_Anbrud"); 342 secondaryPriceDescription = Translate("Translate_ProductDecription_Plader_Half"); 343 tertiaryPriceDescription = Translate("Translate_ProductDecription_Plader_Full"); 344 345 if(secondaryPrice.Contains(",")) { 346 string[] sp = secondaryPrice.Split(','); 347 348 if(sp[1].Length == 1) { 349 secondaryPrice += "0"; 350 } 351 } else { 352 secondaryPrice += ",00"; 353 } 354 355 if(tertiaryPrice.Contains(",")) { 356 string[] tp = tertiaryPrice.Split(','); 357 358 if(tp[1].Length == 1) { 359 tertiaryPrice += "0"; 360 } 361 } else { 362 tertiaryPrice += ",00"; 363 } 364 365 break; 366 367 case "group126": 368 primaryPriceDescription = Translate("Translate_ProductDecription_Accessories"); 369 break; 370 371 default: 372 primaryPriceDescription = Translate("Translate_ProductDecription_General_Description"); 373 break; 374 } 375 376 377 <li class="card-list__card product-card"> 378 <a href="@link" class="card__wrapper"> 379 380 @if(!String.IsNullOrWhiteSpace(productImage)) { 381 <picture class="card__picture"> 382 <source srcset="@productImageLg" media="(min-width: 1536px)"> 383 <source srcset="@productImageMd" media="(min-width: 992px)"> 384 <source srcset="@productImageSm" media="(min-width: 768px)"> 385 <img src="@productImageDefault" alt="@name"> 386 </picture> 387 } else { 388 <div class="card__picture card__picture--dummie"></div> 389 } 390 391 <div class="card__info-list__item"> 392 <span class="info info--small info--header">@Translate("Translate_Product_Page_ProductNumber"): @productNumber</span> 393 @if(!string.IsNullOrWhiteSpace(dbNumber)) { 394 <span class="info info--small info--header">@dbNumberLabel: @dbNumber</span> 395 } 396 </div> 397 <div class="card__info-list__item "> 398 <span class="info info--title">@name</span> 399 </div> 400 <div class="card__info-list__item"> 401 <span class="info info--small product-teaser">@teaser</span> 402 </div> 403 @if(isloggedin && ((!String.IsNullOrWhiteSpace(primaryPrice) && primaryPrice != "0,00" && primaryPrice != ",00") || (!String.IsNullOrWhiteSpace(secondaryPrice) && secondaryPrice != "0,00" && secondaryPrice != ",00") || (!String.IsNullOrWhiteSpace(tertiaryPrice) && tertiaryPrice != "0,00" && tertiaryPrice != ",00"))) { 404 <div class="card__info-list__item column"> 405 @if(!String.IsNullOrWhiteSpace(primaryPrice) && primaryPrice != "0,00" && primaryPrice != ",00") { 406 <div class="price-line"> 407 <div class="definition">@primaryPriceDescription</div> 408 <div class="price">@primaryPrice <text> </text> @priceCurrencySymbol <text>pr.</text> @salesUnit</div> 409 </div> 410 } 411 412 @if(!String.IsNullOrWhiteSpace(secondaryPrice) && secondaryPrice != "0,00" && secondaryPrice != ",00") { 413 <div class="price-line"> 414 <div class="definition">@secondaryPriceDescription</div> 415 <div class="price">@secondaryPrice <text> </text> @priceCurrencySymbol <text>pr.</text> @salesUnit</div> 416 </div> 417 } 418 419 @if(!String.IsNullOrWhiteSpace(tertiaryPrice) && tertiaryPrice != "0,00" && tertiaryPrice != ",00") { 420 <div class="price-line"> 421 <div class="definition">@tertiaryPriceDescription</div> 422 <div class="price">@tertiaryPrice <text> </text> @priceCurrencySymbol <text>pr.</text> @salesUnit</div> 423 </div> 424 } 425 </div> 426 } 427 </a> 428 </li> 429 } 430 </ul> 431 @if(GetInteger("Ecom:ProductList.TotalPages") > 1) { 432 string prevClass = ""; 433 string nextClass = ""; 434 string extraPaginationClass = ""; 435 436 if(String.IsNullOrWhiteSpace(GetString("Ecom:ProductList.PrevPage.Clean"))) { 437 prevClass = " disabled"; 438 } 439 440 if(String.IsNullOrWhiteSpace(GetString("Ecom:ProductList.NextPage.Clean"))) { 441 nextClass = " disabled"; 442 } 443 444 if(GetInteger("Ecom:ProductList.TotalPages") > 5) { 445 extraPaginationClass = "navigation__pagination--overload"; 446 } 447 448 <div class="card-list__footer"> 449 <div class="card-list__navigation"> 450 <a href="@GetString("Ecom:ProductList.PrevPage.Clean")" class="navigation__arrow back@(prevClass)"> 451 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 6.503"><path d="M10.94,6.5,14,3.249,10.94,0H9.693L12.4,2.8H0v.9H12.4L9.693,6.5Z"/></svg> 452 </a> 453 454 <div class="navigation__pagination @extraPaginationClass"> 455 <span class="navigation__pagination__title"> @Translate("Translate_ProductList_BreadCrumbPage") </span> 456 @for (int i = 0; i < GetInteger("Ecom:ProductList.TotalPages"); i++) 457 { 458 string currentClass = (i + 1) == GetInteger("Ecom:ProductList.CurrentPage") ? " active" : ""; 459 string url = GetString("Ecom:Group.Link.Clean") + "&PageNum=" + (i + 1); 460 461 foreach(var query in GetLoop("Query.Parameters")) { 462 if(!String.IsNullOrWhiteSpace(query.GetString("Parameter.Value"))) { 463 url += "&" + query.GetString("Parameter.Name") + "=" + query.GetString("Parameter.Value"); 464 } 465 } 466 467 if(!isStandardSorting) { 468 url += "&Sortby=NameForSort" + "&SortOrder=" + sortOrder; 469 } 470 471 <a href="@url" class="navigation__pagination__link@(currentClass)">@(i + 1)</a> 472 } 473 </div> 474 <a href="@GetString("Ecom:ProductList.NextPage.Clean")" class="navigation__arrow forward@(nextClass)"> 475 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 6.503"><path d="M10.94,6.5,14,3.249,10.94,0H9.693L12.4,2.8H0v.9H12.4L9.693,6.5Z"/></svg> 476 </a> 477 </div> 478 </div> 479 } 480 </article> 481 </section> 482 } 483 484 @{ 485 string groupSeoText = GetString("Ecom:Group:Field.SEOText"); 486 487 if (!string.IsNullOrWhiteSpace(groupSeoText)) { 488 <article class="module module-sand-light"> 489 <div class="rich-text"> 490 @groupSeoText 491 </div> 492 </article> 493 } 494 } 495 496 @functions { 497 Dynamicweb.Ecommerce.Products.Group FindTopGroup(Dynamicweb.Ecommerce.Products.Group group) 498 { 499 if (group.IsTopGroup) 500 { 501 return group; 502 } 503 else if (group.ParentGroups != null && group.ParentGroups.Count > 0) 504 { 505 foreach (var parentGroup in group.ParentGroups) 506 { 507 Dynamicweb.Ecommerce.Products.Group topLevelGroup = FindTopGroup(parentGroup); 508 if (topLevelGroup != null) 509 { 510 return topLevelGroup; 511 } 512 } 513 } 514 return null; 515 } 516 } 517
Template:BaseUrlSystem.String/Files/Templates/Designs/keflico/QueryPublisher/
Template:DesignBaseUrlSystem.String/Files/Templates/Designs/keflico/
Loops

Facet Groups

Parameters

QueryResult

Page of
TemplateTags() in code (Designs\keflico\QueryPublisher/List.cshtml). Remove before going live...