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_208621cfd0154ffab62a4eb3fdcc246d.Execute() in D:\inetpub\wwwroot\www.warmgarant.nl\Files\Templates\Designs\Warmgarant\_parsed\Installers.parsed.cshtml:line 153
   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 @if (hpId > 0) 134 { 135 @RenderParagraphContent(hpId) 136 } 137 </header> 138 <main> 139 @using System.Web 140 @using Warmgarant.Shop.Repository.Helpers 141 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 142 143 @{ 144 var isDetailPage = false; 145 var qObjectId = HttpContext.Current.Request.QueryString["ObjectID"]; 146 var qAction = HttpContext.Current.Request.QueryString["Action"]; 147 if (!string.IsNullOrEmpty(qObjectId) && qAction == "Detail") 148 { 149 isDetailPage = true; 150 } 151 } 152 <div id="installers_page" class="container"> 153 @NavigationHelper.GetBreadCrumb() 154 155 @if (!isDetailPage) 156 { 157 <section class="page-content row"> 158 @(!string.IsNullOrEmpty(GetString("Title")) ? "<h1>" + GetString("Title") + "</h1>" : "") 159 <aside class="col s12 m12 l3" id="sidebar_left">@GetValue("DwContent(sidebarleft)")</aside> 160 <main class="col s12 m12 l6" id="main_content">@GetValue("DwContent(maincontent)")</main> 161 <aside class="col s12 m12 l3" id="sidebar_right">@GetValue("DwContent(sidebarright)")</aside> 162 </section> 163 164 <section class="page-content-fullwidth"> 165 <div id="content_fullwidth">@GetValue("DwContent(contentfullwidth)")</div> 166 </section> 167 } 168 else 169 { 170 <section class="page-content row"> 171 @(!string.IsNullOrEmpty(GetString("Title")) ? "<h1>" + GetString("Title") + "</h1>" : "") 172 <aside class="col s12 m12 l3" id="sidebar_left_detail">@GetValue("DwContent(sidebarleftdetail)")</aside> 173 <main class="col s12 m12 l6" id="main_content_detail">@GetValue("DwContent(maincontentdetail)")</main> 174 @* let op! unwrap verwijderd de dwcontent container tags "data-settings="unwrap:true;"" *@ 175 <aside id="sidebar_right_detail" class="col s12 m12 l3"> 176 <div id="installer-picture"></div> 177 @GetValue("DwContent(sidebarrightdetailinstaller)") 178 <div id="installer-logo"></div> 179 </aside> 180 </section> 181 } 182 </div> 183 </main> 184 <footer> 185 @if (fpId > 0) 186 { 187 @RenderParagraphContent(fpId) 188 } 189 </footer> 190 <script src="@warmgarantJs"></script> 191 @if (Dynamicweb.Frontend.PageView.Current().Page.NavigationTag.Equals(Warmgarant.Shop.Models.Constants.StringConstants.Navigation.ServiceContractInfo)) 192 { 193 <text> 194 @using Warmgarant.Shop.Repository.Helpers 195 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 196 @{ 197 // THIS CONTENT WILL BE ACTIVE WHEN THE CURRENT PAGE NAVIGATION TAG IS: ServiceContractInfo 198 // THE MODAL WIL OPEN ONCLICK OF AN ELEMENT WITH CLASSNAME: servicecontract-callback 199 200 var callMeBackParagraphId = AreaHelper.GetAreaItemIntValueBySystemName(Warmgarant.Shop.Models.Constants.StringConstants.WebsiteConfiguration.CallMeBackParagraphId); 201 if (callMeBackParagraphId > 0) 202 { 203 var modalId = $"ServiceContractCallMeBackModal"; 204 var seoParagraphServiceContractCall = string.Format("{0}/{1}", System.Web.HttpContext.Current.Request.Url.Authority, Translate("SEO_VirtualPageviewServiceContractCallMeBackForm", "all-in-service-callmeback-form")); 205 206 <div id="@modalId" class="modal modal-large quotation-request-modal"> 207 <div class="modal-header"> 208 <h3>@Translate("ServiceContractCallMeBack_Modal_Header", "Call me back request")</h3> 209 <div class="modal-action modal-close"> 210 <img src="/files/templates/designs/warmtethuis/images/icons/x-close.svg" title='@Translate("Close", "Close").JsEncode()' class="black-svg"> 211 </div> 212 </div> 213 <div class="modal-content rich-text-editor-content"> 214 @RenderParagraphContent(callMeBackParagraphId) 215 </div> 216 </div> 217 218 @SnippetStart("JavaScriptBottom") 219 <script> 220 var openServiceContractCallMeBackModal = function () { 221 $('#@modalId').innovadisModal().modal('open'); 222 }; 223 </script> 224 @SnippetEnd("JavaScriptBottom") 225 @SnippetStart("JavaScriptDocReady") 226 <text> 227 228 // Init modal call me back request 229 $('.servicecontract-callback').off("click").on("click", function (e) { 230 e.preventDefault(); 231 openServiceContractCallMeBackModal(); 232 SEO.trackPageView("@seoParagraphServiceContractCall", '@GetGlobalValue("Global:CookieOptInLevel").ToLower()' === 'functional'); 233 return false; 234 }); 235 $("label.checkbox", "#@modalId").innovadisCheckbox({}); 236 </text> 237 @SnippetEnd("JavaScriptDocReady") 238 } 239 } 240 </text> 241 } 242 @RenderSnippet("JavaScriptBottom") 243 <script> 244 function getParam(p) { 245 var match = RegExp('[?&]' + p + '=([^&]*)').exec(window.location.search); 246 return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); 247 } 248 249 function getExpiryRecord(value) { 250 var expiryPeriod = 90 * 24 * 60 * 60 * 1000; // 90 day expiry in milliseconds 251 var expiryDate = new Date().getTime() + expiryPeriod; 252 return { 253 value: value, 254 expiryDate: expiryDate 255 }; 256 } 257 258 function addGclid() { 259 var gclidParam = getParam('gclid'); 260 var gclidFormFields = ['QuotationRequests_GCLID']; // all possible gclid form field ids here 261 var gclidRecord = null; 262 var currGclidFormField; 263 var gclsrcParam = getParam('gclsrc'); 264 var isGclsrcValid = !gclsrcParam || gclsrcParam.indexOf('aw') !== -1; 265 266 gclidFormFields.forEach(function (field) { 267 if (document.getElementById(field)) { 268 currGclidFormField = document.getElementById(field); 269 } 270 }); 271 272 if (gclidParam && isGclsrcValid) { 273 gclidRecord = getExpiryRecord(gclidParam); 274 localStorage.setItem('gclid', JSON.stringify(gclidRecord)); 275 } 276 277 var gclid = gclidRecord || JSON.parse(localStorage.getItem('gclid')); 278 var isGclidValid = gclid && new Date().getTime() < gclid.expiryDate; 279 280 if (currGclidFormField && isGclidValid) { 281 currGclidFormField.value = gclid.value; 282 } 283 } 284 285 window.addEventListener('load', addGclid); 286 </script> 287 @using Warmgarant.Shop.Repository.Helpers 288 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 289 @{ 290 if (IntercomHelper.IntercomIsActive()) 291 { 292 var intercomAppId = Warmgarant.Shop.Models.Config.ExtraConfig.ExtraConfiguration.IntercomMessengerSettings.AppId; 293 if (!string.IsNullOrWhiteSpace(intercomAppId)) 294 { 295 <script> 296 297 function setIntercomCookie(cname, cvalue, exdays) { 298 var d = new Date(); 299 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 300 var expires = "expires=" + d.toUTCString(); 301 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 302 } 303 304 function getIntercomCookie(cname) { 305 var name = cname + "="; 306 var decodedCookie = decodeURIComponent(document.cookie); 307 var ca = decodedCookie.split(';'); 308 for (var i = 0; i < ca.length; i++) { 309 var c = ca[i]; 310 while (c.charAt(0) == ' ') { 311 c = c.substring(1); 312 } 313 if (c.indexOf(name) == 0) { 314 return c.substring(name.length, c.length); 315 } 316 } 317 return ""; 318 } 319 320 window.intercomSettings = { 321 app_id: "@intercomAppId", // app Id located in the web.config 322 custom_launcher_selector: '.openIntercom', // links with the '.openIntercom' class activate the intercom messenger 323 hide_default_launcher: true // hides the intercom icon in right bottom corner 324 }; 325 326 327 (function() { 328 var w = window; 329 var ic = w.Intercom; 330 if (typeof ic === "function") { 331 ic('reattach_activator'); 332 ic('update', intercomSettings); 333 334 } else { 335 var d = document; 336 var i = function() { i.c(arguments) }; 337 i.q = []; 338 i.c = function(args) { i.q.push(args) }; 339 w.Intercom = i; 340 341 function l() { 342 var s = d.createElement('script'); 343 s.type = 'text/javascript'; 344 s.async = true; 345 s.src = 'https://widget.intercom.io/widget/bz2i6o1f'; 346 var x = d.getElementsByTagName('script')[0]; 347 x.parentNode.insertBefore(s, x); 348 } 349 350 if (w.attachEvent) { 351 w.attachEvent('onload', l); 352 } else { 353 w.addEventListener('load', l, false); 354 } 355 356 // use cookie value to determine if the messenger should be shown on page. 357 // by default no messenger should be shown 358 // the messenger should open on trigger click 359 // the messenger should stay in focus despite changing pages as long as the cookie value is true 360 // when manually hiding the messenger by clicking the close/hide link the cookie value changes to false 361 var intercomCookieName = "WarmgarantIntercomIsOpen"; 362 var currentCookieValue = getIntercomCookie(intercomCookieName); 363 if (currentCookieValue === "true") { 364 w.Intercom('show'); 365 } 366 w.Intercom('onShow', function () { 367 setIntercomCookie(intercomCookieName, "true", 60); 368 }); 369 w.Intercom('onHide', function () { 370 setIntercomCookie(intercomCookieName, "false", 60); 371 }); 372 } 373 })() 374 </script> 375 } 376 } 377 } 378 379 <script> 380 $(function () { 381 382 // seo original pageview tracking 383 var anonymized = '@GetGlobalValue("Global:CookieOptInLevel").ToLower()' === 'functional'; 384 SEO.trackOriginalView(anonymized); 385 386 @RenderSnippet("JavaScriptDocReady") 387 }); 388 </script> 389 </body> 390 </html>