Error executing template "Designs/Plymovent/_parsed/820-Segment-Itemtype.parsed.cshtml"
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at Dynamicweb.ItemPublisher.FilterHelper.ToXml(String filter)
   at Dynamicweb.ItemPublisher.Frontend.GetContentBySettings(String settings)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Dynamicweb.Extensibility.AddIns.AddInManager.InvokeFunction(Object instance, String functionName, Object[] arguments)
   at Dynamicweb.Rendering.TemplateBase`1.RenderItemList(Object settings) in E:\Agent\_work\169\s\06 - Dynamicweb Host\Dynamicweb\Dynamicweb-9.9\Dynamicweb\Rendering\TemplateBase.cs:line 306
   at CompiledRazorTemplates.Dynamic.RazorEngine_7324cc8e53574dd9a60c592cd38b661f.Execute() in C:\Data\Hosts\plymovent.com dw9\home\Templates\Designs\Plymovent\_parsed\820-Segment-Itemtype.parsed.cshtml:line 531
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate() in E:\Agent\_work\169\s\06 - Dynamicweb Host\Dynamicweb\Dynamicweb-9.9\Dynamicweb\Rendering\Template.cs:line 902

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb; 3 @using Dynamicweb.Content; 4 @using Dynamicweb.Rendering; 5 @using Dynamicweb.Frontend; 6 @using Dynamicweb.Content.Items; 7 @using Dynamicweb.Content.Items.Rendering; 8 @using System.Web; 9 10 @{ 11 string AreaFirstPage = GetString("DwAreaFirstPageID"); 12 string SearchPageID = Pageview.Area.Item["SearchPageID"].ToString(); 13 14 var GoogleTaskManagerID = GetValue("Item.Area.Google_Tag_Manager.Value"); 15 16 string currentCulture = @GetString("LongLang"); 17 string currentCultureShort = currentCulture.Split('-')[0]; 18 if (currentCulture == "en-GB") currentCulture = ""; 19 20 } 21 <!DOCTYPE html> 22 <html lang="@currentCultureShort"> 23 <head> 24 <meta charset="utf-8"> 25 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 26 <meta name="viewport" content="width=device-width, initial-scale=1"> 27 <title>@GetValue("Title")</title> 28 @GetValue("MetaTags") 29 @GetValue("CopyRightNotice") 30 31 <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"> 32 <link rel="stylesheet" href="/Files/Templates/Designs/Plymovent/assets/css/style.min.css"> 33 34 <!-- Bootstrap --> 35 <!--<link href="assets/css/style.min.css" rel="stylesheet">--> 36 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 37 <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> 38 <!--[if lt IE 9]> 39 <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> 40 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 41 <![endif]--> 42 43 44 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> 45 <script defer="" src="/Files/Templates/Designs/Plymovent/bootstrap/js/modal.js"></script> 46 <script defer="" src="/Files/Templates/Designs/Plymovent/assets/js/lib/jquery.placeholder.js"></script> 47 <script defer="" src="/Files/Templates/Designs/Plymovent/assets/js/lib/jquery.validate.min.js"></script> 48 49 <script defer="" src="/Files/Templates/Designs/Plymovent/assets/endless/js/endlessRiver.js"></script> 50 51 <link rel="stylesheet" href="/Files/Templates/Designs/Plymovent/assets/endless/css/endlessRiver.css"> 52 <script defer=""> 53 $(document).ready(function () { 54 $("#myUl").endlessRiver(); 55 }); 56 </script> 57 58 <!-- maps.google.com eerst laden omdat require niet goed overweg met script die async geladen wordt --> 59 <script defer="" src="//maps.google.com/maps/api/js?key=AIzaSyAsL4I2obNQovlU4TQYpbgJsZU7Rt1Wmec&amp;language=en-US" type="text/javascript"></script> 60 <script defer="" data-main="/files/templates/designs/plymovent/assets/js/app" src="/Files/Templates/Designs/Plymovent/assets/js/lib/require.min.js"></script> 61 62 63 <!--<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"></noscript>--> 64 <!-- Plymovent favicons --> 65 <link rel="icon" href="/Files/Templates/Designs/Plymovent/assets/img/favicon.ico"> 66 <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png"> 67 <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png"> 68 <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png"> 69 <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png"> 70 <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png"> 71 <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png"> 72 <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png"> 73 <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png"> 74 <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon-180x180.png"> 75 <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32"> 76 <link rel="icon" type="image/png" href="/android-chrome-192x192.png" sizes="192x192"> 77 <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96"> 78 <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16"> 79 <link rel="manifest" href="/android-chrome-manifest.json"> 80 <meta name="msapplication-TileColor" content="#da532c"> 81 <meta name="msapplication-TileImage" content="/mstile-144x144.png"> 82 <meta name="theme-color" content="#ffe946"> 83 84 @foreach (var w in GetLoop("Languages")) 85 { 86 var language = w.GetString("Culture").Split('-')[0]; 87 var domain = !string.IsNullOrWhiteSpace(w.GetString("PrimaryDomain")) ? w.GetString("PrimaryDomain") : Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 88 var pID = w.GetString("PageID"); 89 if (string.IsNullOrWhiteSpace(pID)) 90 { 91 pID = w.GetString("FirstPageID"); 92 } 93 var url = string.Format("//{0}{1}", domain, Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(BuildRawUrl(pID))); 94 95 if (!w.GetBoolean("IsCurrent")) 96 { 97 <link rel="alternate" href="@url" hreflang="@language"> 98 } 99 else if (!string.IsNullOrWhiteSpace(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(pID))) 100 { 101 var defaultURL = string.Format("https://www.plymovent.com"); 102 <link rel="alternate" href="@defaultURL" hreflang="x-default"> 103 } 104 } 105 106 <!-- We add webtrax code (some sort of user tracking) only when viewing from the US --> 107 @if(GetString("LongLang") == "en-US") 108 { 109 <!-- Begin WebTrax --> 110 <script type="text/javascript"> 111 var wto = wto || []; 112 wto.push(['setWTID', 'wt-25d89773-643b-40d8-8709-f2ad151a9893']); 113 wto.push(['webTraxs']); 114 (function() { 115 var wt = document.createElement('script'); 116 wt.src = document.location.protocol + '//www.webtraxs.com/wt.php'; 117 wt.type = 'text/javascript'; 118 wt.async = true; 119 var s = document.getElementsByTagName('script')[0]; 120 s.parentNode.insertBefore(wt, s); 121 })(); 122 </script> 123 <noscript><img src="https://www.webtraxs.com/webtraxs.php?id=wt-25d89773-643b-40d8-8709-f2ad151a9893&st=img" alt=""></noscript> 124 <!-- End WebTrax --> 125 } 126 127 128 @renderRichSnippet() 129 130 @renderReviewSnippet() 131 132 @RenderSnippet("FaqList") 133 134 135 <!-- Global site tag (gtag.js) - Google Ads: 1032821095 --> 136 <script async="" src="https://www.googletagmanager.com/gtag/js?id=AW-1032821095"></script> 137 <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-1032821095');</script> 138 139 <!-- Event snippet for Contact us form conversion page In your html page, add the snippet and call gtag_report_conversion when someone clicks on the chosen link or button. --> 140 <!--<script> function gtag_report_conversion(url) { var callback = function () { if (typeof(url) != 'undefined') { window.location = url; } }; gtag('event', 'conversion', { 'send_to': 'AW-1032821095/1ZOcCLK_2dwBEOeyvuwD', 'event_callback': callback }); return false; } </script> --> 141 142 143 144 @GetValue("Stylesheets") 145 @GetValue("Javascripts") 146 </head> 147 <body class="lang-@currentCultureShort"> 148 <div id="spinner_loading"> 149 <img src="/Files/Templates/Designs/Plymovent/assets/img/ajax-loader.gif"> 150 </div> 151 <style> 152 #spinner_loading { 153 background: #FFF; 154 position: fixed; 155 top: 0; 156 bottom: 0; 157 left: 0; 158 right: 0; 159 z-index: 99999; 160 height: 100%; 161 width: 100%; 162 } 163 164 #spinner_loading img { 165 position: absolute; 166 top: 50%; 167 left: 50%; 168 transform: translate(-50%, -50%); 169 width: auto; 170 height: auto; 171 } 172 </style> 173 174 <script> 175 window.addEventListener("load", function () { 176 if(typeof document.getElementById("spinner_loading").remove == "function"){ 177 document.getElementById("spinner_loading").remove() 178 } else { 179 document.getElementById("spinner_loading").outerHTML=""; 180 } 181 }); 182 </script> 183 184 185 186 187 <!-- Google Tag Manager --> 188 <noscript> 189 <iframe src="//www.googletagmanager.com/ns.html?id=GTM-@GoogleTaskManagerID" height="0" width="0" style="display:none;visibility:hidden"></iframe> 190 </noscript> 191 <script defer=""> 192 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 193 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 194 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 195 '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 196 })(window,document,'script','dataLayer','GTM-@GoogleTaskManagerID');</script> 197 <!-- End Google Tag Manager --> 198 199 <div class="container-fluid distributor"> 200 <div class="container"> 201 <div class="col-md-offset-5 col-xs-offset-6 col-xs-3"> 202 @if (GetString("DwAreaName").Equals("DE")) 203 { 204 <a href="https://webshop.plymovent.de/" class="btn distributorlogin webshop">@Translate("HeaderShopButton", "Webshop")</a> 205 } 206 else if (GetString("DwAreaName").Equals("TH")) 207 { 208 <a href="https://webshop.plymovent.co.th/" class="btn distributorlogin webshop">@Translate("HeaderShopButton", "Webshop")</a> 209 } 210 else if (GetString("DwAreaName").Equals("FR")) 211 { 212 <a href="https://webshop.plymovent.fr/" class="btn distributorlogin webshop">@Translate("Webshop", "Boutique en ligne")</a> 213 } 214 else if (GetString("DwAreaName").Equals("US")) 215 { 216 <a href="https://www.plymovent.com/us/contact-plymovent/webshops" class="btn distributorlogin webshop">@Translate("HeaderShopButton", "Webshop")</a> 217 } 218 </div> 219 <div class="col-xs-3"> 220 <a class="btn distributorlogin hidden-xs" href="https://extranet.plymovent.com">@Translate("DistributorLogin", "Distributor login")</a> 221 <a class="btn distributorlogin visible-xs-block" href="https://extranet.plymovent.com">@Translate("Login", "Login")</a> 222 </div> 223 </div> 224 </div> 225 <div class="container menu-container"> 226 227 <div class="row margin-bottom-md"> 228 <div class="col-md-5 col-sm-4 col-xs-12 logo"> 229 230 <a href="Default.aspx?ID=@AreaFirstPage" title="Plymovent"> 231 <img class="img-responsive" src="/Files/Billeder/Plymovent/plymoventlogo.png" alt="Plymovent Logo"> 232 </a> 233 </div> 234 <div class="col-md-3 col-xs-4 language"> 235 <div class="dropdown"> 236 237 <button class="btn btn-default btn-block dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> 238 <span class="glyphicon glyphicon-globe"></span> 239 @getLanguage("", true) 240 </button> 241 <ul class="dropdown-menu language-dropdown" role="menu" aria-labelledby="languageselect"> 242 @foreach (var language in GetLoop("Languages")) 243 { 244 var Culture = language.GetString("Culture"); 245 var url = BuildRawUrl(language.GetString("PageID")); 246 247 <li role="presentation"> 248 <a role="menuitem" tabindex="-1" href="@url"> 249 @if (Culture == "en-GB") 250 { 251 <text>English (Rest of the World)</text> 252 } 253 else if (Culture == "en-US") 254 { 255 <text>English (North America)</text> 256 } 257 else 258 { 259 @getLanguage(Culture, false) 260 } 261 </a> 262 <!-- --> 263 </li> 264 265 } 266 </ul> 267 268 </div> 269 </div> 270 271 <div class="col-md-3 col-xs-4 search"> 272 <form action="/default.aspx" method="get"> 273 <div class="input-group"> 274 <input type="hidden" name="ID" value="@SearchPageID"> 275 <input type="text" name="q" class="form-control" placeholder='@Translate("SearchThisSite", "Search this site")'> 276 <span class="input-group-btn"> 277 <button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"></span></button> 278 </span> 279 </div> 280 </form> 281 </div> 282 </div> 283 284 <nav class="navbar navbar-default" role="navigation"> 285 <div class="container-fluid"> 286 <div class="navbar-header"> 287 <a href="Default.aspx?ID=@AreaFirstPage" class="sticky-logo" title="Plymovent"> 288 <div class="navbar__logo img-responsive"></div> 289 @*<img class="img-responsive" src="/Files/Billeder/Plymovent/plymoventlogo.png" alt="Plymovent Logo">*@ 290 </a> 291 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse"> 292 <span class="sr-only">Toggle navigation</span> 293 <span class="icon-bar"></span> 294 <span class="icon-bar"></span> 295 <span class="icon-bar"></span> 296 <span class="menu-title">Menu</span> 297 <span class="glyphicon glyphicon-chevron-down"></span> 298 </button> 299 </div> 300 <div class="collapse navbar-collapse" id="navbar-collapse"> 301 <ul class="nav navbar-nav"> 302 @GetValue("DwNavigation(mainnavigation)") 303 <li class="visible-xs-block"> 304 <div class="menu-extra language"> 305 <div class="dropdown"> 306 <button class="btn btn-default btn-block dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> 307 @getLanguage(@GetString("LongLang"), true) 308 <span class="glyphicon glyphicon-globe"></span> 309 </button> 310 <ul class="dropdown-menu language-dropdown" role="menu" aria-labelledby="languageselect"> 311 @foreach (var item in GetLoop("Languages")) 312 { 313 var pID = item.GetString("PageID"); 314 var FirstPageID = item.GetString("FirstPageID"); 315 var Culture = item.GetString("Culture"); 316 317 if (string.IsNullOrWhiteSpace(pID)) 318 { 319 pID = FirstPageID; 320 } 321 322 <li role="presentation"> 323 <a role="menuitem" tabindex="-1" class="language-@Culture" href="/Default.aspx?ID=@pID"> 324 @getLanguage(Culture, false) 325 </a> 326 </li> 327 } 328 </ul> 329 </div> 330 </div> 331 <div class="menu-extra"> 332 <form action="/default.aspx" method="get"> 333 <div class="input-group"> 334 <input type="hidden" name="ID" value="@SearchPageID"> 335 <input type="text" name="q" class="form-control" placeholder='@Translate("Search", "Search")'> 336 <span class="input-group-btn"> 337 <button class="btn btn-default" type="button"><span class="glyphicon glyphicon-search"></span></button> 338 </span> 339 </div> 340 </form> 341 </div> 342 </li> 343 </ul> 344 345 </div> 346 </div> 347 </nav> 348 </div> 349 350 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 351 @using Dynamicweb; 352 @using Dynamicweb.Content; 353 @using Dynamicweb.Rendering; 354 @using Dynamicweb.Frontend; 355 @using Dynamicweb.Content.Items; 356 @using Dynamicweb.Content.Items.Rendering; 357 358 359 360 361 <div class="container productsegments"> 362 <div class="row"> 363 <div class="col-md-12"> 364 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 365 @using Dynamicweb; 366 367 <ul class="breadcrumb" itemscope="" itemtype="https://schema.org/BreadcrumbList"> 368 <li> 369 <a href="/" title="Terug naar homepage"> 370 @Translate("menuhomepage", "Home") 371 </a> 372 </li> 373 @GetValue("DwNavigation(bc)") 374 375 @if (!string.IsNullOrWhiteSpace(System.Web.HttpContext.Current.Request["productid"])) 376 { 377 <li class="current"> 378 <span itemprop="title"> 379 @GetValue("Title") 380 </span> 381 </li> 382 } 383 </ul> 384 </div> 385 </div> 386 387 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 388 @using Dynamicweb; 389 390 <div class="row"> 391 <div class="col-md-12"> 392 <div class="row"> 393 <div class="col-xs-3"> 394 @if (!string.IsNullOrWhiteSpace(GetString("Page:Ecom.ProductList.GroupName")) || GetString("DwPageName_2") == "Products") 395 { 396 <a href="javascript:history.back()" class="page-back">@Translate("btnBack", "Back")</a> 397 } 398 </div> 399 400 <div class="col-xs-9"> 401 <h1 class="page-title">@GetString("Title")</h1> 402 </div> 403 </div> 404 <div class="striped-border"></div> 405 </div> 406 </div> 407 408 <div class="row"> 409 <div class="col-sm-12 col-md-3"> 410 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 411 @using Dynamicweb; 412 @{ 413 var collapseClass = "collapse in"; 414 if(Pageview.Device.ToString() == "Mobile" || Pageview.Device.ToString() == "Tablet") { 415 collapseClass = "collapse"; 416 } 417 } 418 <a href="#sidemenu" class="sidemenu-collapse" data-toggle="collapse" aria-expanded="false" aria-controls="sidemenu">@Translate("Showhidemenu", "Show/hide menu")</a> 419 <nav id="sidemenu" class="@collapseClass"> 420 @if (GetGlobalValue("Global:Page.Top.Name") == "Blog") 421 { 422 @GetValue("DwNavigation(Categorynavigation)") 423 } 424 else 425 { 426 @GetValue("DwNavigation(Categorynavigation2)") 427 } 428 </nav> 429 <div class="row" id="left_column_span3">@GetValue("DwContent(leftcolumnspan3)")</div> 430 </div> 431 432 <div class="col-sm-12 col-md-9"> 433 <div class="content_element"> 434 <div class="row"> 435 <div class="col-md-12"> 436 <div class="col-md-4"> 437 <div class="row"> 438 @{ 439 var photo = GetString("Item.Image"); 440 var alternativeImg = Pageview.Area.Item["Alt_Image"]; 441 var AltTxt = GetString("Item.Alt"); 442 <div class="col-md-12 product-image-body"> 443 <img src="/Admin/Public/GetImage.ashx?Image=@photo&amp;Format=jpg&amp;Width=400&amp;altFmImage_path=@alternativeImg" alt="@AltTxt" class="img-full"> 444 </div> 445 } 446 </div> 447 </div> 448 449 <!-- --> 450 @GetString("Item.Tekst.Value") 451 </div> 452 </div> 453 454 455 456 <div class="row"> 457 <!-- --> 458 <div class="col-md-8 col-xs-12 col-sm-12 col-md-6"> 459 <div class="segment-part segment-part-download"> 460 <strong class="header">@Translate("Download", "Download")</strong> 461 <ul class="square"> 462 @if (!string.IsNullOrEmpty(GetString("Item.Download1.Value"))) 463 { 464 var download_title_1 = GetString("Item.Download1.Name"); 465 var download1Label = Translate("download_title_1", "Brochure"); 466 var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(GetString("Item.Download1.Value")); 467 468 if (metadata != null) 469 { 470 // Use metadata.GetValue(...), e.g. 471 download_title_1 = metadata.GetValue("title"); 472 } 473 474 if (!string.IsNullOrEmpty(GetString("Item.Download1_Label.Value"))) 475 { 476 download1Label = GetString("Item.Download1_Label.Value"); 477 } 478 479 <li> 480 <a href='@GetString("Item.Download1.Value")' title="@download1Label" target="_blank">@download1Label</a> 481 </li> 482 } 483 @if (!string.IsNullOrEmpty(GetString("Item.Download2.Value"))) 484 { 485 var download_title_2 = GetString("Item.Download2.Name"); 486 var download2Label = Translate("download_title_2", "Brochure"); 487 var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(GetString("Item.Download2.Value")); 488 489 if (metadata != null) 490 { 491 // Use metadata.GetValue(...), e.g. 492 download_title_2 = metadata.GetValue("title"); 493 } 494 495 if (!string.IsNullOrEmpty(GetString("Item.Download2_Label.Value"))) 496 { 497 download2Label = GetString("Item.Download2_Label.Value"); 498 } 499 500 <li> 501 <a href='@GetString("Item.Download2.Value")' title="@download2Label" target="_blank">@download2Label</a> 502 </li> 503 } 504 @if (!string.IsNullOrEmpty(GetString("Item.Download3.Value"))) 505 { 506 var download_title_3 = GetString("Item.Download3.Name"); 507 var download3Label = Translate("download_title_3", "Brochure"); 508 var metadata = Dynamicweb.Content.Files.Metadata.EditorFactory.GetMetadataForFile(GetString("Item.Download3.Value")); 509 510 if (metadata != null) 511 { 512 // Use metadata.GetValue(...), e.g. 513 download_title_3 = metadata.GetValue("title"); 514 } 515 516 if (!string.IsNullOrEmpty(GetString("Item.Download3_Label.Value"))) 517 { 518 download3Label = GetString("Item.Download3_Label.Value"); 519 } 520 <li> 521 <a href='@GetString("Item.Download3.Value")' title="@download3Label" target="_blank">@download3Label</a> 522 </li> 523 } 524 </ul> 525 </div> 526 </div> 527 <!-- --> 528 </div> 529 530 @{ 531 var renderRef = RenderItemList(new 532 { 533 ItemType = "References", 534 ListSourceType = "Area", 535 ListSourceArea = Pageview.AreaID, 536 ItemFieldsList = "*", 537 ListTemplate = "ItemPublisher/List/ply_references_list.cshtml", 538 ListPageSize = 16, 539 Filter = @"SegmentLink = """ + "Default.aspx?ID=" + Pageview.Page.ID + @"""" 540 541 }); 542 543 if (renderRef.ToString().Contains("img")) 544 { 545 <div class="row"> 546 <div class="col-md-12"> 547 <h3>@Translate("References", "References")</h3> 548 @renderRef 549 </div> 550 </div> 551 } 552 553 } 554 555 556 557 </div> 558 559 <div class="row" id="right_column_span9">@GetValue("DwContent(rightcolumnspan9)")</div> 560 </div> 561 </div> 562 </div> 563 564 565 <div class="container"> 566 <div class="row usps"> 567 @RenderParagraphContent(GetInteger("Item.Area.USPGlobalID.Value")) 568 </div> 569 </div> 570 571 <footer class="footer"> 572 <div class="container"> 573 <div class="row footer-row"> 574 <div class="footer-image"> 575 @RenderParagraphContent(GetInteger("Item.Area.FooterImageGlobalID.Value")) 576 </div> 577 <div class="footer-navigateto"> 578 <strong>@Translate("Navigate_to", "Navigate to")</strong> 579 <ul> 580 @GetValue("DwNavigation(bottomnavigation)") 581 </ul> 582 </div> 583 <div class="footer-distributor"> 584 @RenderParagraphContent(GetInteger("Item.Area.DistributorGlobalID.Value")) 585 </div> 586 <div class="footer-contactinformation"> 587 @RenderParagraphContent(GetInteger("Item.Area.AddressGlobalID.Value")) 588 </div> 589 </div> 590 </div> 591 <div class="container-fluid bottom-container"> 592 <div class="container"> 593 <div class="row"> 594 <div class="bottom-nav"> 595 <ul> 596 @GetValue("DwNavigation(navfooter)") 597 </ul> 598 <span>@string.Format(Translate("copyright", "Copyright © {0} Plymovent. All rights reserved."), DateTime.Now.Year)</span> 599 </div> 600 <div class="bs-docs-social"> 601 <span class="social-info">@Translate("FollowPlymovent", "Follow Plymovent")</span> 602 <ul class="bs-docs-social-buttons"> 603 @GetValue("DwNavigation(navsocialmedia)") 604 </ul> 605 <span class="copyright">@string.Format(Translate("copyright", "Copyright © {0} Plymovent. All rights reserved."), DateTime.Now.Year)</span> 606 </div> 607 </div> 608 </div> 609 </div> 610 </footer> 611 612 @RenderSnippet("Modal") 613 614 <script defer=""> 615 function InitJqValTranslations() { 616 $.extend($.validator.messages, { 617 required: "此栏必须填写。", 618 remote: "Please fix this field.", 619 email: "请填写一个有效的电子邮件地址。", 620 url: "Please enter a valid URL.", 621 date: "Please enter a valid date.", 622 dateISO: "Please enter a valid date ( ISO ).", 623 number: "Please enter a valid number.", 624 digits: "Please enter only digits.", 625 creditcard: "Please enter a valid credit card number.", 626 equalTo: "Please enter the same value again.", 627 maxlength: $.validator.format("Please enter no more than {0} characters."), 628 minlength: $.validator.format("Please enter at least {0} characters."), 629 rangelength: $.validator.format("Please enter a value between {0} and {1} characters long."), 630 range: $.validator.format("Please enter a value between {0} and {1}."), 631 max: $.validator.format("Please enter a value less than or equal to {0}."), 632 min: $.validator.format("Please enter a value greater than or equal to {0}."), 633 termandconditions: $.validator.format("请接受条款和条件。") 634 635 }); 636 } 637 </script> 638 <script defer="" type='text/javascript' id="__bs_script__"> 639 //<![CDATA[ 640 var ext = location.host.split(':')[0].split('.').pop() 641 if (ext == 'local' || isNaN(ext) == false) { 642 document.write("<script async src='//HOST:3000/browser-sync/browser-sync-client.1.7.1.js'><\/script>".replace(/HOST/g, location.hostname).replace(/PORT/g, location.port)); 643 } 644 //]]></script> 645 646 </body> 647 </html> 648 649 650 @helper renderRichSnippet() 651 { 652 <script type="application/ld+json"> 653 654 [{ 655 "@@context": "http://schema.org", 656 "@@type": "Organization", 657 "name" : "@GetString("DwAreaName")", 658 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 659 "sameAs" : "@GetString("Item.Area.Facebook")", 660 "logo": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()/Files/Billeder/Plymovent/plymoventlogo.png", 661 "contactPoint" : [{ 662 "@@type" : "ContactPoint", 663 "telephone" : "@GetString("Item.Area.Phonenumber")", 664 "contactType" : "customer service" , 665 "@@context": "http://schema.org", 666 "@@id": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()/Files/Billeder/Plymovent/plymoventlogo.png", 667 "name": "@GetString("DwAreaName")" 668 }], 669 "address": { 670 "@@type": "PostalAddress", 671 "streetAddress": "@GetString("Item.Area.StreetAddress")", 672 "addressLocality": "@GetString("Item.Area.AddressLocality")", 673 "addressRegion": "@GetString("Item.Area.AddressRegion")", 674 "postalCode": " @GetString("Item.Area.PostalCode")", 675 "addressCountry": "@GetString("Item.Area.AddressCountry")" 676 } 677 }, 678 { 679 "@@context": "http://schema.org", 680 "@@type": "WebSite", 681 "name" : "@GetString("DwAreaName")", 682 "alternateName" : "Plymovent", 683 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 684 "potentialAction": { 685 "@@type": "SearchAction", 686 "target": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()/default.aspx?id=@GetString("Item.Area.SearchPage")?&q={search_term_string}", 687 "query-input": "required name=search_term_string" 688 } 689 }] 690 691 692 693 </script> 694 } 695 696 697 <!-- Structured Data JSON-LD --> 698 @helper renderReviewSnippet() 699 { 700 var reviewName = GetString("Item.Area.Review_Name") != null ? GetString("Item.Area.Review_Name") : ""; 701 var reviewBestRating = GetString("Item.Area.Review_Best_Rating") != null ? GetString("Item.Area.Review_Best_Rating") : ""; 702 var reviewWorstRating = GetString("Item.Area.Review_Worst_Rating") != null ? GetString("Item.Area.Review_Worst_Rating") : ""; 703 var reviewRatingValue = GetString("Item.Area.Review_Rating_Value") != null ? GetString("Item.Area.Review_Rating_Value") : ""; 704 var reviewCount = GetString("Item.Area.Review_Count") != null ? GetString("Item.Area.Review_Count") : ""; 705 var reviewUrl = GetString("Item.Area.Review_URL") != null ? GetString("Item.Area.Review_URL") : ""; 706 707 708 <script type="application/ld+json"> 709 { 710 "@@context": "http://schema.org", 711 "@@type": "Product", 712 "name": "@reviewName", 713 "url":"@reviewUrl", 714 "aggregateRating": { 715 "@@type": "AggregateRating", 716 "bestRating": "@reviewBestRating", 717 "worstRating": "@reviewWorstRating", 718 "ratingValue": "@reviewRatingValue", 719 "reviewCount": "@reviewCount" 720 } 721 } 722 </script> 723 } 724 725 726 727 728 @functions { 729 public string keepQuerystring(LoopItem language) 730 { 731 var qs = HttpUtility.ParseQueryString(System.Web.HttpContext.Current.Request.QueryString.ToString()); 732 qs.Set("ID", language.GetString("PageID")); 733 734 var page = Dynamicweb.Extensibility.ServiceLocator.Current.GetPageService().GetPage(language.GetInteger("FirstActivePageID")); 735 736 string url = "//" + language.GetString("PrimaryDomain") + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(language.GetInteger("PageID")); 737 738 foreach (string key in qs) 739 { 740 if (key == null) 741 { 742 continue; 743 } 744 if (key.Equals("ID", StringComparison.InvariantCultureIgnoreCase)) 745 { 746 continue; 747 } 748 var value = qs[key]; 749 750 var urlFromHandler = Dynamicweb.Frontend.UrlProviders.Handler.GetUrlFromQueryString(key, value, page.Area.EcomLanguageId); 751 752 if (string.IsNullOrWhiteSpace(urlFromHandler)) 753 { 754 url = url.Contains("?") ? string.Format("{0}&{1}={2}", url, key, value) : string.Format("{0}?{1}={2}", url, key, value); 755 } 756 else 757 { 758 if (Dynamicweb.Frontend.SearchEngineFriendlyURLs.UseExtensionLessUrls) 759 { 760 url += urlFromHandler.Replace(".aspx", ""); 761 } 762 else 763 { 764 url = url.Replace(".aspx", urlFromHandler); 765 } 766 } 767 } 768 return url; 769 } 770 771 public string BuildRawUrl(string PageID) 772 { 773 string rawUrl = "Default.aspx?"; 774 var queryStringParams = new Dictionary<string, string>(); 775 776 foreach (var qItem in System.Web.HttpContext.Current.Request.QueryString.AllKeys) 777 { 778 if (qItem != null) 779 { 780 queryStringParams.Add(qItem, System.Web.HttpContext.Current.Request.QueryString[qItem]); 781 } 782 } 783 784 queryStringParams["ID"] = PageID; 785 786 foreach (var item in queryStringParams) 787 { 788 rawUrl += $"{item.Key}={item.Value}&"; 789 } 790 791 rawUrl = rawUrl.Trim('&'); 792 793 return rawUrl; 794 } 795 } 796 797 @helper getLanguage(string strCulture, bool ignoreEnglish) 798 { 799 switch (strCulture) 800 { 801 case "en-GB": 802 if (ignoreEnglish) 803 { 804 @Translate("SelectYourLanguage", "Select your language") 805 } 806 else 807 { 808 @Translate("English", "English") 809 } 810 break; 811 case "nl-NL": 812 @Translate("Dutch", "Nederlands") 813 break; 814 case "de-DE": 815 @Translate("Deutsch", "Deutsch") 816 break; 817 case "es-ES": 818 @Translate("Español", "Español") 819 break; 820 case "fr-FR": 821 @Translate("Français", "Français") 822 break; 823 case "sv-SE": 824 @Translate("Svenska", "Svenska") 825 break; 826 case "zh-CN": 827 @Translate("china", "中文") 828 break; 829 case "de-LI": 830 @Translate("Deutsch", "Deutsch") 831 break; 832 case "nl-BE": 833 @Translate("Belgium", "Belgium") 834 break; 835 case "en-CA": 836 @Translate("Canada", "Canada") 837 break; 838 case "en-US": 839 @Translate("USA_menu", "English (USA)") 840 break; 841 case "sq-AL": 842 @Translate("china", "中文") 843 break; 844 case "th-TH": 845 @Translate("Thai", "ไทย") 846 break; 847 default: 848 @Translate("SelectYourLanguage", "Select your language") 849 break; 850 } 851 } 852