Error executing template "Designs/Warmtethuis/_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 System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at Warmgarant.Shop.Repository.Helpers.NavigationHelper.GetBreadCrumb(String containerClass) in D:\a\1\s\Warmgarant.Shop.Repository\Helpers\NavigationHelper.cs:line 496
   at CompiledRazorTemplates.Dynamic.RazorEngine_657a7814fb8944d983aab95b8b382ece.Execute() in D:\inetpub\wwwroot\www.warmgarant.nl\Files\Templates\Designs\Warmtethuis\_parsed\Installers.parsed.cshtml:line 192
   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/warmtethuis/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/warmtethuis.min.css"); 17 var cssWarmtethuis = Fingerprint.Tag(templateDesignBaseUrl, "Css/warmtethuis.min.css"); 18 19 var vendorJs = Fingerprint.Tag(templateDesignBaseUrl, "Styleguide/js/vendor.min.js"); 20 var warmtethuisStyleguideJs = Fingerprint.Tag(templateDesignBaseUrl, "Styleguide/js/warmtethuis.min.js"); 21 var warmtethuisJs = Fingerprint.Tag(templateDesignBaseUrl, "Scripts/warmtethuis.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.0"> 36 <meta name="application-name" content="warmtethuis.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/Warmtethuis/Images/favicon.ico" type="image/x-icon"> 50 <link rel="shortcut icon" href="/Files/Templates/Designs/Warmtethuis/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 <link rel="stylesheet" href="https://use.typekit.net/znz2dkr.css"> 56 <!--Local CSS--> 57 <link rel="stylesheet" type="text/css" href="@cssStyleguide"> 58 <link rel="stylesheet" type="text/css" href="@cssWarmtethuis"> 59 <!--Scripts--> 60 <script> 61 // Set global JavaScript variable with AreaID 62 var dwAreaID = @GetInteger("DwAreaID"); 63 </script> 64 <script src="@vendorJs"></script> 65 <script src="@warmtethuisStyleguideJs"></script> 66 <script src="/Scripts/jquery.waypoints.min.js"></script> 67 <script src="/Scripts/sticky.min.js"></script> 68 69 @RenderSnippet("HeadContent") 70 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 71 @{ 72 var googleTagmanagerCode = Warmgarant.Shop.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.GoogleTagmanagerCode); 73 if (!string.IsNullOrWhiteSpace(googleTagmanagerCode)) 74 { 75 <!-- Google Tag Manager --> 76 <script> 77 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push( 78 {'gtm.start': new Date().getTime(),event:'gtm.js'} 79 );var f=d.getElementsByTagName(s)[0], 80 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 81 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 82 })(window, document, 'script', 'dataLayer', '@googleTagmanagerCode'); 83 </script> 84 <!-- End Google Tag Manager --> 85 } 86 } 87 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 88 @{ 89 var googleTrackingCode = Warmgarant.Shop.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.GoogleTrackingCode); 90 if (!string.IsNullOrWhiteSpace(googleTrackingCode)) 91 { 92 var optInLevel = GetGlobalValue("Global:CookieOptInLevel"); 93 // optInLevel can be: 94 // - None (0) 95 // - Functional (1) 96 // - All (2) 97 98 <script> 99 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 100 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 101 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 102 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 103 104 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 105 106 ga('create', '@googleTrackingCode', 'auto'); 107 // 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. 108 // Anonymization based on CookieOptInLevel is done there. 109 </script> 110 111 if (optInLevel.Equals("None", StringComparison.InvariantCultureIgnoreCase)) 112 { 113 <script> 114 // GA opt out 115 window['ga-disable-@googleTrackingCode'] = true; 116 </script> 117 } 118 } 119 } 120 @GetValue("Stylesheets") 121 @GetValue("Javascripts") 122 </head> 123 <body data-pageid='@GetGlobalValue("Global:Page.ID")' data-navtop='@NavigationHelper.GetActiveTopLevelPageId(GetGlobalValue("Global:Page.ID"))'> 124 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 125 @{ 126 if (!string.IsNullOrWhiteSpace(googleTagmanagerCode)) 127 { 128 var tagManagerUrl = string.Format("https://www.googletagmanager.com/ns.html?id={0}", googleTagmanagerCode); 129 <!-- Google Tag Manager (noscript) --> 130 <noscript> 131 <iframe src="@tagManagerUrl" height="0" width="0" style="display:none;visibility:hidden"></iframe> 132 </noscript> 133 <!-- End Google Tag Manager (noscript) --> 134 } 135 } 136 <header> 137 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 138 @{ 139 var notificationText = Warmgarant.Shop.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.NotificationText).Trim(); 140 if (!string.IsNullOrWhiteSpace(notificationText)) 141 { 142 <div class="content header-notification"> 143 <div class="header-notification__spacer"></div> 144 <div class="header-notification__content">@notificationText</div> 145 <a href="/hide-notification" class="header-notification__button notification-hide"> 146 <img src="/Files/Templates/Designs/Warmtethuis/images/icons/x-close-white.svg"> 147 </a> 148 </div> 149 150 @SnippetStart("JavaScriptBottom") 151 <script> 152 $(document).ready(function () { 153 154 var sessionStorageId = "Warmtethuis_Hide_Notification"; 155 var hideNotification = window.sessionStorage.getItem(sessionStorageId); 156 if (hideNotification == null || hideNotification !== 'true') { 157 $(".header-notification").addClass('active'); 158 $("main").addClass('notification-active'); 159 } 160 161 $(".notification-hide").off("click").on("click", function () { 162 window.sessionStorage.setItem(sessionStorageId, 'true'); 163 $(".header-notification").removeClass('active'); 164 $("main").removeClass('notification-active'); 165 return false; 166 }); 167 }); 168 </script> 169 @SnippetEnd("JavaScriptBottom") 170 } 171 } 172 @if (hpId > 0) 173 { 174 @RenderParagraphContent(hpId) 175 } 176 </header> 177 178 <main> 179 @using System.Web 180 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 181 182 @{ 183 var isDetailPage = false; 184 var qObjectId = HttpContext.Current.Request.QueryString["ObjectID"]; 185 var qAction = HttpContext.Current.Request.QueryString["Action"]; 186 if (!string.IsNullOrEmpty(qObjectId) && qAction == "Detail") 187 { 188 isDetailPage = true; 189 } 190 } 191 <div id="installers_page" class="container"> 192 @NavigationHelper.GetBreadCrumb() 193 194 @if (!isDetailPage) 195 { 196 <section id="main_content_home">@GetValue("DwContent(maincontenthome)")</section> 197 <section id="main_content_home_narrow">@GetValue("DwContent(maincontenthomenarrow)")</section> 198 <section id="main_content_home_bottom">@GetValue("DwContent(maincontenthomebottom)")</section> 199 <section id="main_content_home_bottom_narrow">@GetValue("DwContent(maincontenthomebottomnarrow)")</section> 200 } 201 else 202 { 203 <section class="row"> 204 @(!string.IsNullOrEmpty(GetString("Title")) ? "<h1>" + GetString("Title") + "</h1>" : "") 205 <aside class="col s12 m12 l3" id="sidebar_left_detail">@GetValue("DwContent(sidebarleftdetail)")</aside> 206 <main class="col s12 m12 l6" id="main_content_detail">@GetValue("DwContent(maincontentdetail)")</main> 207 @* let op! unwrap verwijderd de dwcontent container tags "data-settings="unwrap:true;"" *@ 208 <aside id="sidebar_right_detail" class="col s12 m12 l3"> 209 <div id="installer-picture"></div> 210 @GetValue("DwContent(sidebarrightdetailinstaller)") 211 <div id="installer-logo"></div> 212 </aside> 213 </section> 214 } 215 </div> 216 </main> 217 218 <footer> 219 @if (fpId > 0) 220 { 221 @RenderParagraphContent(fpId) 222 } 223 </footer> 224 225 <!--Scripts--> 226 <script src="@warmtethuisJs"></script> 227 @if (Dynamicweb.Frontend.PageView.Current().Page.NavigationTag.Equals(Warmgarant.Shop.Models.Constants.StringConstants.Navigation.ServiceContractInfo)) 228 { 229 <text> 230 @using Warmgarant.Shop.Repository.Helpers 231 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 232 @{ 233 // THIS CONTENT WILL BE ACTIVE WHEN THE CURRENT PAGE NAVIGATION TAG IS: ServiceContractInfo 234 // THE MODAL WIL OPEN ONCLICK OF AN ELEMENT WITH CLASSNAME: servicecontract-callback 235 236 var callMeBackParagraphId = AreaHelper.GetAreaItemIntValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.CallMeBackParagraphId); 237 if (callMeBackParagraphId > 0) 238 { 239 var modalId = $"ServiceContractCallMeBackModal"; 240 var seoParagraphServiceContractCall = string.Format("{0}/{1}", System.Web.HttpContext.Current.Request.Url.Authority, Translate("SEO_VirtualPageviewServiceContractCallMeBackForm", "all-in-service-callmeback-form")); 241 242 <div id="@modalId" class="modal modal-large quotation-request-modal"> 243 <div class="modal-header"> 244 <h3>@Translate("ServiceContractCallMeBack_Modal_Header", "Call me back request")</h3> 245 <div class="modal-action modal-close"> 246 <img src="/files/templates/designs/warmtethuis/images/icons/x-close.svg" title='@Translate("Close", "Close").JsEncode()' class="black-svg"> 247 </div> 248 </div> 249 <div class="modal-content rich-text-editor-content"> 250 @RenderParagraphContent(callMeBackParagraphId) 251 </div> 252 </div> 253 254 @SnippetStart("JavaScriptBottom") 255 <script> 256 var openServiceContractCallMeBackModal = function () { 257 $('#@modalId').innovadisModal().modal('open'); 258 }; 259 $(function () { 260 // Init modal call me back request 261 $('.servicecontract-callback').off("click").on("click", function (e) { 262 e.preventDefault(); 263 openServiceContractCallMeBackModal(); 264 SEO.trackPageView("@seoParagraphServiceContractCall", '@GetGlobalValue("Global:CookieOptInLevel").ToLower()' === 'functional'); 265 return false; 266 }); 267 $("label.checkbox", "#@modalId").innovadisCheckbox({}); 268 }); 269 </script> 270 @SnippetEnd("JavaScriptBottom") 271 } 272 } 273 </text> 274 } 275 @RenderSnippet("JavaScriptBottom") 276 <script> 277 function getParam(p) { 278 var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search); 279 return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); 280 } 281 282 function getExpiryRecord(value) { 283 var expiryPeriod = 90 * 24 * 60 * 60 * 1000; // 90 day expiry in milliseconds 284 var expiryDate = new Date().getTime() + expiryPeriod; 285 return { 286 value: value, 287 expiryDate: expiryDate 288 }; 289 } 290 291 function addGclid() { 292 var gclidParam = getParam('gclid'); 293 var gclidFormFields = ['QuotationRequests_GCLID']; // all possible gclid form field ids here 294 var gclidRecord = null; 295 var currGclidFormField; 296 var gclsrcParam = getParam('gclsrc'); 297 var isGclsrcValid = !gclsrcParam || gclsrcParam.indexOf('aw') !== -1; 298 299 gclidFormFields.forEach(function (field) { 300 if (document.getElementById(field)) { 301 currGclidFormField = document.getElementById(field); 302 } 303 }); 304 305 if (gclidParam && isGclsrcValid) { 306 gclidRecord = getExpiryRecord(gclidParam); 307 localStorage.setItem('gclid', JSON.stringify(gclidRecord)); 308 } 309 310 var gclid = gclidRecord || JSON.parse(localStorage.getItem('gclid')); 311 var isGclidValid = gclid && new Date().getTime() < gclid.expiryDate; 312 313 if (currGclidFormField && isGclidValid) { 314 currGclidFormField.value = gclid.value; 315 } 316 } 317 318 window.addEventListener('load', addGclid); 319 </script> 320 @using Warmgarant.Shop.Repository.Helpers 321 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 322 @{ 323 if (IntercomHelper.IntercomIsActive()) 324 { 325 var intercomAppId = Warmgarant.Shop.Models.Config.ExtraConfig.ExtraConfiguration.IntercomMessengerSettings.AppId; 326 if (!string.IsNullOrWhiteSpace(intercomAppId)) 327 { 328 <script> 329 330 function setIntercomCookie(cname, cvalue, exdays) { 331 var d = new Date(); 332 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 333 var expires = "expires=" + d.toUTCString(); 334 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 335 } 336 337 function getIntercomCookie(cname) { 338 var name = cname + "="; 339 var decodedCookie = decodeURIComponent(document.cookie); 340 var ca = decodedCookie.split(';'); 341 for (var i = 0; i < ca.length; i++) { 342 var c = ca[i]; 343 while (c.charAt(0) == ' ') { 344 c = c.substring(1); 345 } 346 if (c.indexOf(name) == 0) { 347 return c.substring(name.length, c.length); 348 } 349 } 350 return ""; 351 } 352 353 window.intercomSettings = { 354 app_id: "@intercomAppId", // app Id located in the web.config 355 custom_launcher_selector: '.openIntercom', // links with the '.openIntercom' class activate the intercom messenger 356 hide_default_launcher: true // hides the intercom icon in right bottom corner 357 }; 358 359 360 (function() { 361 var w = window; 362 var ic = w.Intercom; 363 if (typeof ic === "function") { 364 ic('reattach_activator'); 365 ic('update', intercomSettings); 366 367 } else { 368 var d = document; 369 var i = function() { i.c(arguments) }; 370 i.q = []; 371 i.c = function(args) { i.q.push(args) }; 372 w.Intercom = i; 373 374 function l() { 375 var s = d.createElement('script'); 376 s.type = 'text/javascript'; 377 s.async = true; 378 s.src = 'https://widget.intercom.io/widget/bz2i6o1f'; 379 var x = d.getElementsByTagName('script')[0]; 380 x.parentNode.insertBefore(s, x); 381 } 382 383 if (w.attachEvent) { 384 w.attachEvent('onload', l); 385 } else { 386 w.addEventListener('load', l, false); 387 } 388 389 // use cookie value to determine if the messenger should be shown on page. 390 // by default no messenger should be shown 391 // the messenger should open on trigger click 392 // the messenger should stay in focus despite changing pages as long as the cookie value is true 393 // when manually hiding the messenger by clicking the close/hide link the cookie value changes to false 394 var intercomCookieName = "WarmgarantIntercomIsOpen"; 395 var currentCookieValue = getIntercomCookie(intercomCookieName); 396 if (currentCookieValue === "true") { 397 w.Intercom('show'); 398 } 399 w.Intercom('onShow', function () { 400 setIntercomCookie(intercomCookieName, "true", 60); 401 }); 402 w.Intercom('onHide', function () { 403 setIntercomCookie(intercomCookieName, "false", 60); 404 }); 405 } 406 })() 407 </script> 408 } 409 } 410 } 411 412 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 413 <script type="text/javascript"> 414 piAId = '867102'; 415 piCId = '43215'; 416 piHostname = 'pi.pardot.com'; 417 418 @*var onlyFunctional = '@GetGlobalValue("Global:CookieOptInLevel").ToLower()' === 'functional';*@ 419 420 (function() { 421 function async_load(){ 422 var s = document.createElement('script'); s.type = 'text/javascript'; 423 s.src = ('https:' == document.location.protocol ? 'https://pi' : 'http://cdn') + '.pardot.com/pd.js'; 424 var c = document.getElementsByTagName('script')[0]; c.parentNode.insertBefore(s, c); 425 } 426 if(window.attachEvent) { window.attachEvent('onload', async_load); } 427 else { window.addEventListener('load', async_load, false); } 428 })(); 429 </script> 430 431 <script> 432 $(function () { 433 // seo original pageview tracking 434 var anonymized = '@GetGlobalValue("Global:CookieOptInLevel").ToLower()' === 'functional'; 435 SEO.trackOriginalView(anonymized); 436 437 @RenderSnippet("JavaScriptDocReady") 438 }); 439 </script> 440 </body> 441 </html> 442