Error executing template "Designs/Warmgarant/_parsed/Installers.parsed.cshtml"
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at Warmgarant.Shop.Repository.Helpers.NavigationHelper.GetBreadCrumb(String containerClass) in D:\a\1\s\Warmgarant.Shop.Repository\Helpers\NavigationHelper.cs:line 499
   at CompiledRazorTemplates.Dynamic.RazorEngine_da0174ec20fd4a3aa5a481a437af6160.Execute() in D:\inetpub\wwwroot\www.warmgarant.nl\Files\Templates\Designs\Warmgarant\_parsed\Installers.parsed.cshtml:line 188
   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 Warmgarant.Shop.Repository.Helpers 2 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3 @{ 4 var requestHost = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host")); 5 var hpId = AreaHelper.GetAreaItemIntValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.HeaderParagraphId); 6 var fpId = AreaHelper.GetAreaItemIntValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.FooterParagraphId); 7 var assetsDirectory = "./files/templates/designs/warmgarant/styleguide/assets/"; 8 9 // seo meta data 10 var pageDescription = GetString("Meta.Description"); 11 var pageKeywords = GetString("Meta.Keywords"); 12 var language = GetGlobalValue("Global:Area.Lang"); 13 14 var templateDesignBaseUrl = GetString("Template:DesignBaseUrl"); 15 16 var cssStyleguide = Fingerprint.Tag(templateDesignBaseUrl, "Styleguide/css/warmgarant.min.css"); 17 var cssWarmgarant = Fingerprint.Tag(templateDesignBaseUrl, "Css/warmgarant.min.css"); 18 19 var vendorJs = Fingerprint.Tag(templateDesignBaseUrl, "Styleguide/js/vendor.min.js"); 20 var warmgarantStyleguideJs = Fingerprint.Tag(templateDesignBaseUrl, "Styleguide/js/warmgarant.min.js"); 21 var warmgarantJs = Fingerprint.Tag(templateDesignBaseUrl, "Scripts/warmgarant.min.js"); 22 } 23 <!DOCTYPE html> 24 <html lang="@language"> 25 <head> 26 <title>@GetValue("Title")</title> 27 @GetValue("MetaTags") 28 @GetValue("CopyRightNotice") 29 30 <meta http-equiv="content-language" content="@language"> 31 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 32 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 33 <meta name="msapplication-tap-highlight" content="no"> 34 <meta name="format-detection" content="telephone=no"> 35 <meta name="viewport" content="width=device-width, initial-scale=1"> 36 <meta name="application-name" content="warmgarant.nl"> 37 <meta name="author" content="Innovadis BV, Enschede"> 38 <meta name="copyright" content="Innovadis BV, Enschede, @DateTime.Now.Year"> 39 <meta name="web_author" content="Innovadis BV, Enschede"> 40 @if (!string.IsNullOrWhiteSpace(pageDescription)) 41 { 42 43 } 44 @if (!string.IsNullOrWhiteSpace(pageKeywords)) 45 { 46 47 } 48 <link rel="dns-prefetch" href="@requestHost"> 49 <link rel="icon" href="/Files/Templates/Designs/Warmgarant/Images/favicon.ico" type="image/x-icon"> 50 <link rel="shortcut icon" href="/Files/Templates/Designs/Warmgarant/Images/favicon.ico" type="image/x-icon"> 51 <!--Remote CSS--> 52 <link href="https://cdn.jsdelivr.net/npm/&#64;mdi/font@2.0.46/css/materialdesignicons.min.css" rel="stylesheet"> 53 <link href="https://fonts.googleapis.com/css?family=Open+Sans:200,200i,300,300i,400,700" rel="stylesheet"> 54 <link href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" rel="stylesheet"> 55 <!--Local CSS--> 56 <link rel="stylesheet" type="text/css" href="@cssStyleguide"> 57 <link rel="stylesheet" type="text/css" href="@cssWarmgarant"> 58 <!--Scripts--> 59 <script> 60 // Set global JavaScript variable with AreaID 61 var dwAreaID = @GetInteger("DwAreaID"); 62 </script> 63 <script src="@vendorJs"></script> 64 <script src="@warmgarantStyleguideJs"></script> 65 @RenderSnippet("HeadContent") 66 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 67 @{ 68 var googleTagmanagerCode = Warmgarant.Shop.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.GoogleTagmanagerCode); 69 if (!string.IsNullOrWhiteSpace(googleTagmanagerCode)) 70 { 71 <!-- Google Tag Manager --> 72 <script> 73 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push( 74 {'gtm.start': new Date().getTime(),event:'gtm.js'} 75 );var f=d.getElementsByTagName(s)[0], 76 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 77 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 78 })(window, document, 'script', 'dataLayer', '@googleTagmanagerCode'); 79 </script> 80 <!-- End Google Tag Manager --> 81 } 82 } 83 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 84 @{ 85 var googleTrackingCode = Warmgarant.Shop.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.GoogleTrackingCode); 86 if (!string.IsNullOrWhiteSpace(googleTrackingCode)) 87 { 88 var optInLevel = GetGlobalValue("Global:CookieOptInLevel"); 89 // optInLevel can be: 90 // - None (0) 91 // - Functional (1) 92 // - All (2) 93 94 <script> 95 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 96 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 97 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 98 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 99 100 var virtualPageviewHasBeenSent = false; // this variable will be set to true in innovadis-seo.js when a virtual pageview has been fired and used to prevent double analytics tracking 101 102 ga('create', '@googleTrackingCode', 'auto'); 103 // NOTE: the analytics tracking event 'send' code, ga('send', 'pageview'), which is located here in the Google code samples is moved to innovadis-seo.js and called at the bottom of the master to be able to prevent double analytics tracking when a virtual pageview has already been fired. 104 // Anonymization based on CookieOptInLevel is done there. 105 </script> 106 107 if (optInLevel.Equals("None", StringComparison.InvariantCultureIgnoreCase)) 108 { 109 <script> 110 // GA opt out 111 window['ga-disable-@googleTrackingCode'] = true; 112 </script> 113 } 114 } 115 } 116 @GetValue("Stylesheets") 117 @GetValue("Javascripts") 118 </head> 119 <body data-pageid='@GetGlobalValue("Global:Page.ID")' data-navtop='@NavigationHelper.GetActiveTopLevelPageId(GetGlobalValue("Global:Page.ID"))'> 120 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 121 @{ 122 if (!string.IsNullOrWhiteSpace(googleTagmanagerCode)) 123 { 124 var tagManagerUrl = string.Format("https://www.googletagmanager.com/ns.html?id={0}", googleTagmanagerCode); 125 <!-- Google Tag Manager (noscript) --> 126 <noscript> 127 <iframe src="@tagManagerUrl" height="0" width="0" style="display:none;visibility:hidden"></iframe> 128 </noscript> 129 <!-- End Google Tag Manager (noscript) --> 130 } 131 } 132 <header> 133 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 134 @{ 135 var notificationText = Warmgarant.Shop.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.NotificationText).Trim(); 136 if (!string.IsNullOrWhiteSpace(notificationText)) 137 { 138 <div class="content header-notification brown-wg darken-3"> 139 <div class="header-notification__spacer"></div> 140 <div class="header-notification__content">@notificationText</div> 141 <a href="/hide-notification" class="header-notification__button notification-hide"> 142 <img src="/Files/Templates/Designs/Warmgarant/images/icons/x-close-white.svg"> 143 </a> 144 </div> 145 146 @SnippetStart("JavaScriptBottom") 147 <script> 148 $(document).ready(function () { 149 150 var sessionStorageId = "Warmgarant_Hide_Notification"; 151 var hideNotification = window.sessionStorage.getItem(sessionStorageId); 152 if (hideNotification == null || hideNotification !== 'true') { 153 $(".header-notification").addClass('active'); 154 $("main").addClass('notification-active'); 155 } 156 157 $(".notification-hide").off("click").on("click", function () { 158 window.sessionStorage.setItem(sessionStorageId, 'true'); 159 $(".header-notification").removeClass('active'); 160 $("main").removeClass('notification-active'); 161 return false; 162 }); 163 }); 164 </script> 165 @SnippetEnd("JavaScriptBottom") 166 } 167 } 168 @if (hpId > 0) 169 { 170 @RenderParagraphContent(hpId) 171 } 172 </header> 173 <main> 174 @using System.Web 175 @using Warmgarant.Shop.Repository.Helpers 176 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 177 178 @{ 179 var isDetailPage = false; 180 var qObjectId = HttpContext.Current.Request.QueryString["ObjectID"]; 181 var qAction = HttpContext.Current.Request.QueryString["Action"]; 182 if (!string.IsNullOrEmpty(qObjectId) && qAction == "Detail") 183 { 184 isDetailPage = true; 185 } 186 } 187 <div id="installers_page" class="container"> 188 @NavigationHelper.GetBreadCrumb() 189 190 @if (!isDetailPage) 191 { 192 <section class="page-content row"> 193 @(!string.IsNullOrEmpty(GetString("Title")) ? "<h1>" + GetString("Title") + "</h1>" : "") 194 <aside class="col s12 m12 l3" id="sidebar_left">@GetValue("DwContent(sidebarleft)")</aside> 195 <main class="col s12 m12 l6" id="main_content">@GetValue("DwContent(maincontent)")</main> 196 <aside class="col s12 m12 l3" id="sidebar_right">@GetValue("DwContent(sidebarright)")</aside> 197 </section> 198 199 <section class="page-content-fullwidth"> 200 <div id="content_fullwidth">@GetValue("DwContent(contentfullwidth)")</div> 201 </section> 202 } 203 else 204 { 205 <section class="page-content row"> 206 @(!string.IsNullOrEmpty(GetString("Title")) ? "<h1>" + GetString("Title") + "</h1>" : "") 207 <aside class="col s12 m12 l3" id="sidebar_left_detail">@GetValue("DwContent(sidebarleftdetail)")</aside> 208 <main class="col s12 m12 l6" id="main_content_detail">@GetValue("DwContent(maincontentdetail)")</main> 209 @* let op! unwrap verwijderd de dwcontent container tags "data-settings="unwrap:true;"" *@ 210 <aside id="sidebar_right_detail" class="col s12 m12 l3"> 211 <div id="installer-picture"></div> 212 @GetValue("DwContent(sidebarrightdetailinstaller)") 213 <div id="installer-logo"></div> 214 </aside> 215 </section> 216 } 217 </div> 218 </main> 219 <footer> 220 @if (fpId > 0) 221 { 222 @RenderParagraphContent(fpId) 223 } 224 </footer> 225 <script src="@warmgarantJs"></script> 226 @if (Dynamicweb.Frontend.PageView.Current().Page.NavigationTag.Equals(Warmgarant.Shop.Models.Constants.StringConstants.Navigation.ServiceContractInfo)) 227 { 228 <text> 229 @using Warmgarant.Shop.Repository.Helpers 230 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 231 @{ 232 // THIS CONTENT WILL BE ACTIVE WHEN THE CURRENT PAGE NAVIGATION TAG IS: ServiceContractInfo 233 // THE MODAL WIL OPEN ONCLICK OF AN ELEMENT WITH CLASSNAME: servicecontract-callback 234 235 var callMeBackParagraphId = AreaHelper.GetAreaItemIntValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.CallMeBackParagraphId); 236 if (callMeBackParagraphId > 0) 237 { 238 var modalId = $"ServiceContractCallMeBackModal"; 239 var seoParagraphServiceContractCall = string.Format("{0}/{1}", System.Web.HttpContext.Current.Request.Url.Authority, Translate("SEO_VirtualPageviewServiceContractCallMeBackForm", "all-in-service-callmeback-form")); 240 241 <div id="@modalId" class="modal modal-large quotation-request-modal"> 242 <div class="modal-header"> 243 <h3>@Translate("ServiceContractCallMeBack_Modal_Header", "Call me back request")</h3> 244 <div class="modal-action modal-close"> 245 <img src="/files/templates/designs/warmtethuis/images/icons/x-close.svg" title='@Translate("Close", "Close").JsEncode()' class="black-svg"> 246 </div> 247 </div> 248 <div class="modal-content rich-text-editor-content"> 249 @RenderParagraphContent(callMeBackParagraphId) 250 </div> 251 </div> 252 253 @SnippetStart("JavaScriptBottom") 254 <script> 255 var openServiceContractCallMeBackModal = function () { 256 $('#@modalId').innovadisModal().modal('open'); 257 }; 258 </script> 259 @SnippetEnd("JavaScriptBottom") 260 @SnippetStart("JavaScriptDocReady") 261 <text> 262 263 // Init modal call me back request 264 $('.servicecontract-callback').off("click").on("click", function (e) { 265 e.preventDefault(); 266 openServiceContractCallMeBackModal(); 267 SEO.trackPageView("@seoParagraphServiceContractCall", '@GetGlobalValue("Global:CookieOptInLevel").ToLower()' === 'functional'); 268 return false; 269 }); 270 $("label.checkbox", "#@modalId").innovadisCheckbox({}); 271 </text> 272 @SnippetEnd("JavaScriptDocReady") 273 } 274 } 275 </text> 276 } 277 @RenderSnippet("JavaScriptBottom") 278 <script> 279 function getParam(p) { 280 var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search); 281 return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); 282 } 283 284 function getExpiryRecord(value) { 285 var expiryPeriod = 90 * 24 * 60 * 60 * 1000; // 90 day expiry in milliseconds 286 var expiryDate = new Date().getTime() + expiryPeriod; 287 return { 288 value: value, 289 expiryDate: expiryDate 290 }; 291 } 292 293 function addGclid() { 294 var gclidParam = getParam('gclid'); 295 var gclidFormFields = ['QuotationRequests_GCLID']; // all possible gclid form field ids here 296 var gclidRecord = null; 297 var currGclidFormField; 298 var gclsrcParam = getParam('gclsrc'); 299 var isGclsrcValid = !gclsrcParam || gclsrcParam.indexOf('aw') !== -1; 300 301 gclidFormFields.forEach(function (field) { 302 if (document.getElementById(field)) { 303 currGclidFormField = document.getElementById(field); 304 } 305 }); 306 307 if (gclidParam && isGclsrcValid) { 308 gclidRecord = getExpiryRecord(gclidParam); 309 localStorage.setItem('gclid', JSON.stringify(gclidRecord)); 310 } 311 312 var gclid = gclidRecord || JSON.parse(localStorage.getItem('gclid')); 313 var isGclidValid = gclid && new Date().getTime() < gclid.expiryDate; 314 315 if (currGclidFormField && isGclidValid) { 316 currGclidFormField.value = gclid.value; 317 } 318 } 319 320 window.addEventListener('load', addGclid); 321 </script> 322 @using Warmgarant.Shop.Repository.Helpers 323 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 324 @{ 325 if (IntercomHelper.IntercomIsActive()) 326 { 327 var intercomAppId = Warmgarant.Shop.Models.Config.ExtraConfig.ExtraConfiguration.IntercomMessengerSettings.AppId; 328 if (!string.IsNullOrWhiteSpace(intercomAppId)) 329 { 330 <script> 331 332 function setIntercomCookie(cname, cvalue, exdays) { 333 var d = new Date(); 334 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 335 var expires = "expires=" + d.toUTCString(); 336 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 337 } 338 339 function getIntercomCookie(cname) { 340 var name = cname + "="; 341 var decodedCookie = decodeURIComponent(document.cookie); 342 var ca = decodedCookie.split(';'); 343 for (var i = 0; i < ca.length; i++) { 344 var c = ca[i]; 345 while (c.charAt(0) == ' ') { 346 c = c.substring(1); 347 } 348 if (c.indexOf(name) == 0) { 349 return c.substring(name.length, c.length); 350 } 351 } 352 return ""; 353 } 354 355 window.intercomSettings = { 356 app_id: "@intercomAppId", // app Id located in the web.config 357 custom_launcher_selector: '.openIntercom', // links with the '.openIntercom' class activate the intercom messenger 358 hide_default_launcher: true // hides the intercom icon in right bottom corner 359 }; 360 361 362 (function() { 363 var w = window; 364 var ic = w.Intercom; 365 if (typeof ic === "function") { 366 ic('reattach_activator'); 367 ic('update', intercomSettings); 368 369 } else { 370 var d = document; 371 var i = function() { i.c(arguments) }; 372 i.q = []; 373 i.c = function(args) { i.q.push(args) }; 374 w.Intercom = i; 375 376 function l() { 377 var s = d.createElement('script'); 378 s.type = 'text/javascript'; 379 s.async = true; 380 s.src = 'https://widget.intercom.io/widget/bz2i6o1f'; 381 var x = d.getElementsByTagName('script')[0]; 382 x.parentNode.insertBefore(s, x); 383 } 384 385 if (w.attachEvent) { 386 w.attachEvent('onload', l); 387 } else { 388 w.addEventListener('load', l, false); 389 } 390 391 // use cookie value to determine if the messenger should be shown on page. 392 // by default no messenger should be shown 393 // the messenger should open on trigger click 394 // the messenger should stay in focus despite changing pages as long as the cookie value is true 395 // when manually hiding the messenger by clicking the close/hide link the cookie value changes to false 396 var intercomCookieName = "WarmgarantIntercomIsOpen"; 397 var currentCookieValue = getIntercomCookie(intercomCookieName); 398 if (currentCookieValue === "true") { 399 w.Intercom('show'); 400 } 401 w.Intercom('onShow', function () { 402 setIntercomCookie(intercomCookieName, "true", 60); 403 }); 404 w.Intercom('onHide', function () { 405 setIntercomCookie(intercomCookieName, "false", 60); 406 }); 407 } 408 })() 409 </script> 410 } 411 } 412 } 413 414 <script> 415 $(function () { 416 417 // seo original pageview tracking 418 var anonymized = '@GetGlobalValue("Global:CookieOptInLevel").ToLower()' === 'functional'; 419 SEO.trackOriginalView(anonymized); 420 421 @RenderSnippet("JavaScriptDocReady") 422 }); 423 </script> 424 </body> 425 </html>