Error executing template "Designs/Kwpn/_parsed/Page.parsed.cshtml"
System.IO.IOException: The process cannot access the file 'D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\Translations.xml' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Dynamicweb.Rendering.Translation.Source.WriteDocument(XmlDocument document)
at Dynamicweb.Rendering.Translation.Source.Save()
at Dynamicweb.Rendering.Translation.Source.UpdateTranslationSource(Source source, IEnumerable`1 newKeys, String designName, IEnumerable`1 cultures)
at Dynamicweb.Rendering.TemplateBase`1.Translate(String text, String defaultValue, String cultureName)
at CompiledRazorTemplates.Dynamic.RazorEngine_339b74a2fa054a1a97018374b2e5995f.Execute() in D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\_parsed\Page.parsed.cshtml:line 480
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()

1 @using System.Web 2 @using Kwpn.Repository.Helpers 3 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4 <!DOCTYPE html> 5 <html lang='@GetString("Lang")'> 6 <head prefix="og: http://ogp.me/ns#"> 7 <meta charset="UTF-8"> 8 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> 9 <meta name="apple-mobile-web-app-capable" content="yes"> 10 <title>@GetValue("Title")</title> 11 @GetValue("MetaTags") 12 @GetValue("CopyRightNotice") 13 14 @using System 15 @using Kwpn.Models.Constants 16 @using Kwpn.Repository.Helpers 17 @using System.Globalization 18 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 19 @{ 20 var urlSchemeHeadSection = HttpContext.Current.Request.Url.Scheme; 21 var urlHostHeadSection = HttpContext.Current.Request.Url.Host; 22 var requestHostHeadSection = string.Format("{0}://{1}", urlSchemeHeadSection, urlHostHeadSection); 23 var iconsFolderHeadSection = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/SystemIcons/", requestHostHeadSection); 24 var cultureHeadSection = GetGlobalValue("Global:Area.LongLang"); 25 var pageIdHeadSection = Dynamicweb.Frontend.PageView.Current().Page.ID; 26 var newsPageIdHeadSection = AreaHelper.GetNewsPageId(cultureHeadSection); 27 var marketplacePageIdHeadSection = AreaHelper.GetMarketplacePageId(cultureHeadSection); 28 var customOgTagsHeadSection = (pageIdHeadSection == newsPageIdHeadSection || pageIdHeadSection == marketplacePageIdHeadSection); 29 var searchFriendlyUrlHeadSection = Dynamicweb.Frontend.PageView.Current().SearchFriendlyUrl; 30 var ogUrlHeadSection = requestHostHeadSection; 31 if (searchFriendlyUrlHeadSection != string.Format("/{0}/homepage", cultureHeadSection.ToLower())) 32 { 33 ogUrlHeadSection = string.Format("{0}://{1}/{2}{3}", urlSchemeHeadSection, urlHostHeadSection, cultureHeadSection, searchFriendlyUrlHeadSection); 34 } 35 var ogTitleHeadSection = GetString("Title"); 36 var ogDescriptionHeadSection = GetString("Meta.Description"); 37 var ogDefaultImageHeadSection = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.OpenGraphImage); 38 var ogImageHeadSection = string.Format("{0}://{1}/{2}", urlSchemeHeadSection, urlHostHeadSection, ogDefaultImageHeadSection); 39 var ogLocaleHeadSection = "nl_NL"; 40 var lastCssWriteTime = System.IO.File.GetLastWriteTime(HttpContext.Current.Server.MapPath("~/Files/Templates/Designs/Kwpn/Css/Custom.css")).Ticks; 41 } 42 43 <meta http-equiv="content-language" content='@GetString("Lang")'> 44 <meta http-equiv="content-type" content="text/html; charset=UTF-8"> 45 <meta http-equiv="imagetoolbar" content="no"> 46 <meta http-equiv="x-dns-prefetch-control" content="on"> 47 <meta http-equiv="x-ua-compatible" content="ie=edge"> 48 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> 49 <meta name="application-name" content="kwpn.nl"> 50 <meta name="author" content="Innovadis BV, Enschede"> 51 <meta name="copyright" content='Innovadis BV, Enschede, @DateTime.Now.Year'> 52 <meta name="web_author" content="Innovadis BV, Enschede"> 53 <meta name="msapplication-TileImage" content='@string.Format("{0}win8-tile-144x144.png",iconsFolderHeadSection)'> 54 <meta name="msapplication-TileColor" content="#ffffff"> 55 <meta name="msapplication-navbutton-color" content="#ffffff"> 56 <meta name="msapplication-square70x70logo" content='@string.Format("{0}win8-tile-70x70.png",iconsFolderHeadSection)'> 57 <meta name="msapplication-square144x144logo" content='@string.Format("{0}win8-tile-144x144.png",iconsFolderHeadSection)'> 58 <meta name="msapplication-square150x150logo" content='@string.Format("{0}win8-tile-150x150.png",iconsFolderHeadSection)'> 59 <meta name="msapplication-wide310x150logo" content='@string.Format("{0}win8-tile-310x150.png",iconsFolderHeadSection)'> 60 <meta name="msapplication-square310x310logo" content='@string.Format("{0}win8-tile-310x310.png",iconsFolderHeadSection)'> 61 62 @if (!customOgTagsHeadSection) 63 { 64 <meta property="og:url" content="@ogUrlHeadSection"> 65 <meta property="og:title" content="@ogTitleHeadSection"> 66 <meta property="og:description" content="@ogDescriptionHeadSection"> 67 <meta property="og:image" content="@ogImageHeadSection"> 68 <meta property="og:locale" content="@ogLocaleHeadSection"> 69 <meta property="og:type" content="website"> 70 <meta property="fb:app_id" content="234190117053664"> 71 } 72 73 <link rel="dns-prefetch" href='@requestHostHeadSection'> 74 <link rel="icon" href="/favicon.ico" type="image/x-icon"> 75 <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"> 76 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon.png",iconsFolderHeadSection)'> 77 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-57x57.png",iconsFolderHeadSection)' sizes="57x57"> 78 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-60x60.png",iconsFolderHeadSection)' sizes="60x60"> 79 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-72x72.png",iconsFolderHeadSection)' sizes="72x72"> 80 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-76x76.png",iconsFolderHeadSection)' sizes="76x76"> 81 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-114x114.png",iconsFolderHeadSection)' sizes="114x114"> 82 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-120x120.png",iconsFolderHeadSection)' sizes="120x120"> 83 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-128x128.png",iconsFolderHeadSection)' sizes="128x128"> 84 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-144x144.png",iconsFolderHeadSection)' sizes="144x144"> 85 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-152x152.png",iconsFolderHeadSection)' sizes="152x152"> 86 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-180x180.png",iconsFolderHeadSection)' sizes="180x180"> 87 <link rel="apple-touch-icon" href='@string.Format("{0}apple-touch-icon-precomposed.png",iconsFolderHeadSection)'> 88 <link rel="icon" type="image/png" href='@string.Format("{0}favicon-16x16.png",iconsFolderHeadSection)' sizes="16x16"> 89 <link rel="icon" type="image/png" href='@string.Format("{0}favicon-32x32.png",iconsFolderHeadSection)' sizes="32x32"> 90 <link rel="icon" type="image/png" href='@string.Format("{0}favicon-96x96.png",iconsFolderHeadSection)' sizes="96x96"> 91 <link rel="icon" type="image/png" href='@string.Format("{0}favicon-160x160.png",iconsFolderHeadSection)' sizes="160x160"> 92 <link rel="icon" type="image/png" href='@string.Format("{0}favicon-192x192.png",iconsFolderHeadSection)' sizes="192x192"> 93 <link rel="icon" type="image/png" href='@string.Format("{0}favicon-196x196.png",iconsFolderHeadSection)' sizes="196x196"> 94 <link href='@string.Format("{0}/Content/bootstrap.min.css",requestHostHeadSection)' rel="stylesheet"> 95 <link href='@string.Format("{0}/Content/themes/base/jquery-ui.min.css",requestHostHeadSection)' rel="stylesheet"> 96 <link href='@string.Format("{0}/Files/Templates/Designs/Kwpn/Css/Custom.css?{1}",requestHostHeadSection,lastCssWriteTime)' rel="stylesheet"> 97 <link href='@string.Format("{0}/Content/font-awesome-4.6.3/css/font-awesome.min.css",requestHostHeadSection)' rel="stylesheet"> 98 <link href='@string.Format("{0}/Content/jquery.fancybox.css",requestHostHeadSection)' type="text/css" rel="stylesheet" media="screen"> 99 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> 100 <!--[if lt IE 9]> 101 <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> 102 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> 103 <![endif]--> 104 <script src='@string.Format("{0}/Scripts/jquery-3.1.0.min.js",requestHostHeadSection)'></script> 105 <script src='@string.Format("{0}/Scripts/jquery-ui-1.12.0.min.js",requestHostHeadSection)'></script> 106 <script src='@string.Format("{0}/Scripts/datepicker-{1}.js",requestHostHeadSection,GetGlobalValue("Global:Area.Lang"))'></script> 107 <script src='@string.Format("{0}/Scripts/bootstrap.min.js",requestHostHeadSection)'></script> 108 <script src='@string.Format("{0}/Scripts/jquery.alphanumeric.js",requestHostHeadSection)'></script> 109 <script src='@string.Format("{0}/Scripts/jquery.fancybox.pack.js?v=2.1.5",requestHostHeadSection)'></script> 110 <script src='@string.Format("{0}/Files/Templates/Designs/Kwpn/Scripts/jquery.tmpl.js",requestHostHeadSection)'></script> 111 <script src='@string.Format("{0}/Files/Templates/Designs/Kwpn/Scripts/Custom.js",requestHostHeadSection)'></script> 112 <script src='@string.Format("{0}/Files/Templates/Designs/Kwpn/Scripts/innovadis-seo.js",requestHostHeadSection)'></script> 113 <script src='@string.Format("{0}/Scripts/innovadis-checkbox-list.js",requestHostHeadSection)'></script> 114 <script src='@string.Format("{0}/Scripts/jquery.orgchart.js",requestHostHeadSection)'></script> 115 <script src="https://www.google.com/recaptcha/api.js"></script> 116 @using Kwpn.Models.Constants 117 @using Kwpn.Repository.Helpers 118 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 119 @{ 120 var googleTrackingCode = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ThirdPartyConfiguration.GoogleTrackingCode); 121 if (!string.IsNullOrWhiteSpace(googleTrackingCode)) 122 { 123 <script> 124 125 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() 126 { (i[r].q=i[r].q||[]).push(arguments)} 127 ,i[r].l=1*new Date();a=s.createElement(o), 128 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 129 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 130 131 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 132 133 ga('create', '@googleTrackingCode', 'auto'); 134 // 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. 135 </script> 136 } 137 } 138 @using Kwpn.Models.Constants 139 @using Kwpn.Repository.Helpers 140 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 141 @{ 142 var googleTagmanagerCodeHead = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ThirdPartyConfiguration.GoogleTagManagerCode); 143 if (!string.IsNullOrWhiteSpace(googleTagmanagerCodeHead)) 144 { 145 <!-- Google Tag Manager --> 146 <script> 147 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 148 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 149 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 150 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 151 })(window, document, 'script', 'dataLayer', '@googleTagmanagerCodeHead'); 152 </script> 153 <!-- End Google Tag Manager --> 154 } 155 156 // Google Adsense 157 <script data-ad-client="ca-pub-3169257067253610" async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 158 } 159 @RenderSnippet("HeaderContent") 160 @GoogleAdsHelper.GetGoogleAdsHeadScript(GetString("Item.Page.HeadScript"), GetString("Item.Page.HeadScript_2")) 161 @GetValue("Stylesheets") 162 @GetValue("Javascripts") 163 </head> 164 @{ 165 var bodyClass = (NavigationHelper.CurrentPageIsHomepage()) ? "homepage" : ""; 166 var copyRightMessage = Translate("CopyrightNotifyText", "© KWPN ALL RIGHTS RESERVED").JsEncode(); 167 } 168 <body data-pageid='@GetValue("Global:Page.ID")' class='@bodyClass' oncut='layout.NotifyCopyrightMessage("@copyRightMessage");' oncopy='layout.NotifyCopyrightMessage("@copyRightMessage");'> 169 170 @using Kwpn.Models.Constants 171 @using Kwpn.Repository.Helpers 172 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 173 @{ 174 var googleTagmanagerCodeBody = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ThirdPartyConfiguration.GoogleTagManagerCode); 175 if (!string.IsNullOrWhiteSpace(googleTagmanagerCodeBody)) 176 { 177 var googleTagmanagerIframe = string.Format("https://www.googletagmanager.com/ns.html?id={0}", googleTagmanagerCodeBody); 178 <!-- Google Tag Manager (noscript) --> 179 <noscript> 180 <iframe src="@googleTagmanagerIframe" height="0" width="0" style="display:none;visibility:hidden"></iframe> 181 </noscript> 182 <!-- End Google Tag Manager (noscript) --> 183 } 184 } 185 @using Dynamicweb.Frontend 186 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 187 @{ 188 var ridingHorseRegions = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "RidingHorse"); 189 var harnessHorseRegions = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "HarnessHorse"); 190 var geldingHorseRegions = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "Geldinghorse"); 191 var youngKwpn = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "Young"); 192 var actionUrl = SearchEngineFriendlyURLs.GetFriendlyUrl(string.Format("Default.aspx?ID={0}", GetGlobalValue("Global:Page.ID"))); 193 <div class="content-filter" id="content-filter"> 194 195 <button class="fa fa-close content-filter-close"></button> 196 <form method="post" action="@actionUrl" id="content-filter-form"> 197 <input type="hidden" name="ID" value='@GetGlobalValue("Global:Page.ID")'> 198 <input type="hidden" name="ChangeContentFilter" value="true"> 199 @if (ridingHorseRegions.Any()) 200 { 201 <div class="content-filter-category ridingHorse"> 202 <h3>@Translate("RidingHorse", "Riding horse")</h3> 203 @foreach (var ridingHorseRegion in ridingHorseRegions) 204 { 205 var checked_state = "data-x"; /*DW appends ="" to output @checked_state for some mysterious reason, dummy data-x to make output valid*/ 206 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(ridingHorseRegion.Value)) 207 { 208 checked_state = "checked=\"checked\" data-x"; 209 } 210 <input type="checkbox" id='@ridingHorseRegion.Value' name="content-filter-value[]" value='@ridingHorseRegion.Value' @checked_state=""> 211 <label for='@ridingHorseRegion.Value'>@ridingHorseRegion.Label</label><br> 212 } 213 </div> 214 } 215 @if (harnessHorseRegions.Any()) 216 { 217 <div class="content-filter-category harnessHorse"> 218 <h3>@Translate("HarnessHorse", "Harness horse")</h3> 219 @foreach (var harnessHorseRegion in harnessHorseRegions) 220 { 221 var checked_state = "data-x"; 222 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(harnessHorseRegion.Value)) 223 { 224 checked_state = "checked=\"checked\" data-x"; 225 } 226 <input type="checkbox" id='@harnessHorseRegion.Value' name="content-filter-value[]" value='@harnessHorseRegion.Value' @checked_state=""> 227 <label for='@harnessHorseRegion.Value'>@harnessHorseRegion.Label</label><br> 228 } 229 </div> 230 } 231 @if (geldingHorseRegions.Any()) 232 { 233 <div class="content-filter-category geldingHorse"> 234 <h3>@Translate("Geldinghorse", "Geldinghorse")</h3> 235 @foreach (var geldingHorseRegion in geldingHorseRegions) 236 { 237 var checked_state = "data-x"; 238 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(geldingHorseRegion.Value)) 239 { 240 checked_state = "checked=\"checked\" data-x"; 241 } 242 <input type="checkbox" id='@geldingHorseRegion.Value' name="content-filter-value[]" value='@geldingHorseRegion.Value' @checked_state=""> 243 <label for='@geldingHorseRegion.Value'>@geldingHorseRegion.Label</label><br> 244 } 245 </div> 246 } 247 @if (youngKwpn.Any()) 248 { 249 <div class="content-filter-category youngKwpn"> 250 <h3>@Translate("YoungKwpn", "Young KWPN")</h3> 251 @foreach (var young in youngKwpn) 252 { 253 var checked_state = "data-x"; 254 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(young.Value)) 255 { 256 checked_state = "checked=\"checked\" data-x"; 257 } 258 <input type="checkbox" id='@young.Value' name="content-filter-value[]" value='@young.Value' @checked_state=""> 259 <label for='@young.Value'>@young.Label</label><br> 260 } 261 </div> 262 } 263 <br style="clear: both;"> 264 <a href="#" class="orange_arrow_link content-filter-submit" name="content-filter-apply">@Translate("Apply", "Apply")</a> 265 <i class="fa waitingSpinner fa-spinner fa-spin fa-2x fa-fw margin-bottom"></i> 266 </form> 267 </div> 268 } 269 <div id="pagewrapper"> 270 @using Kwpn.Repository.Helpers 271 @using Kwpn.Models.Constants 272 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 273 @{ 274 var requestHostSearchMobile = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host")); 275 var searchResultsPageIdMobile = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.SearchResultsPageId); 276 } 277 <div class="header_top_mobile hidden-md hidden-lg"> 278 <div class="mobile-logo"> 279 <a href='@NavigationHelper.GetHomepageUrl()' title='@Translate("GoToHomepage", "Go to the homepage").JsEncode()'><img class="logo" src="/Files/Templates/Designs/Kwpn/images/kwpn-logo.svg"></a> 280 </div> 281 <div class="menuMobile"> 282 <div class="hamburgerMenu"><i class="fa fa-reorder"></i></div> 283 <div class="mobile-flags"> 284 @{ 285 var mobileLanguages = GetLoop("Languages"); 286 if (mobileLanguages.Count > 1) 287 { 288 foreach (var mobileLanguage in mobileLanguages) 289 { 290 var languageFlag = ""; 291 var languageClass = ""; 292 var languageCulture = mobileLanguage.GetString("Culture"); 293 var languagePageId = mobileLanguage.GetString("PageID"); 294 var languageFirstActivePageId = mobileLanguage.GetString("FirstActivePageID"); 295 296 var mobileGotoPage = AreaHelper.ChangeLanguageUrl( 297 GetString("DwPageID"), 298 languagePageId, 299 GetString("DWExtranetAction"), 300 languageFirstActivePageId, 301 languageCulture 302 ); 303 304 if (!string.IsNullOrWhiteSpace(languageCulture)) 305 { 306 var languageCode = languageCulture.Split('-')[0]; 307 if (languageCode.Equals("en", StringComparison.InvariantCultureIgnoreCase)) 308 { 309 languageCode = "gb"; 310 } 311 languageFlag = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/Flags/{1}.svg", requestHostSearchMobile, languageCode); 312 if (languageCulture.Equals(GetGlobalValue("Global:Area.LongLang"), StringComparison.InvariantCultureIgnoreCase)) 313 { 314 languageClass = "active"; 315 } 316 <a href="@mobileGotoPage" class="@languageClass"><img src='@languageFlag' class="switch-language"></a> 317 } 318 } 319 } 320 } 321 </div> 322 323 @if (!string.IsNullOrWhiteSpace(searchResultsPageIdMobile)) 324 { 325 var searchQuery = GetString("Ecom:Search.Query"); 326 <form class="search-form" action="default.aspx" method="get" name="GlobalSearchForm" id="mobileSearch" _lpchecked="1"> 327 <input type="hidden" name="ID" value='@searchResultsPageIdMobile'> 328 <input type="text" name="q" class="form-control" required="required" autocomplete="off" maxlength="65" placeholder='@Translate("SearchPlaceholder", "Search")' value='@searchQuery' id="mobileSearchTerm"> 329 <button class="btn btn-default" id="btn-mobile-search" type="submit"><i class="fa fa-search"></i></button> 330 </form> 331 } 332 333 @NavigationHelper.GetMainNavigationMobile(StringConstants.NavigationTags.Main, GetGlobalValue("Global:Page.ID"), Dynamicweb.Frontend.PageView.Current().Area.Culture) 334 335 @{ // ORANGE BUTTON 336 var orangeButtonLink = AreaHelper.CreateUrlBySystemName(StringConstants.PageIdSystemNames.LoginPageId); 337 var orangeButtonText = Translate("LogIn", "Log in"); 338 339 if (LoginHelper.CurrentUserIsLoggedIn()) 340 { 341 orangeButtonLink = AreaHelper.CreateUrlBySystemName(StringConstants.PageIdSystemNames.DashboardPageId); 342 orangeButtonText = Translate("MyDashboard", "My dashboard"); 343 344 var currentPage = string.Format("/Default.aspx?{0}", System.Web.HttpContext.Current.Request.QueryString).UrlEncode(); 345 var logOffLink = string.Format("/Admin/Public/ExtranetLogoff.aspx?redirect={0}", currentPage); 346 var seoPageview = string.Format("/{0}/{1}", GetGlobalValue("Global:Area.LongLang").ToLower(), TranslationHelper.Translate("SEO_TrackPageviewPage_UserLoggedOff", GetGlobalValue("Global:Area.LongLang").ToLower())); 347 348 // ADD Logoff to navigation 349 <script> 350 $(document).ready(function () { 351 // add logoff button 352 $(".menuMobile ul").append("<li><a href='@logOffLink' onclick=\"SEO.trackPageView('@seoPageview')\"><i class='fa fa-chevron-right'></i>@Translate("LogOff", "Log off")</a></li>"); 353 }); 354 </script> 355 } 356 <a href='@orangeButtonLink' class="inloggenMobielLink"> 357 <div class="inloggenMobiel"> 358 <div style="width:200px"> 359 <i class='fa fa-chevron-right'></i>@orangeButtonText 360 </div> 361 </div> 362 </a> 363 } 364 </div> 365 </div> 366 <div class="container header_top hidden-xs hidden-sm"> 367 <div class="row no-gutter"> 368 <div class="col-xs-4 col-xs-offset-6"> 369 @using System 370 @using Kwpn.Models.Constants 371 @using Kwpn.Repository.Helpers 372 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 373 @{ 374 var searchResultsPageId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.SearchResultsPageId); 375 var requestHostSearch = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host")); 376 <div class="searchwrapper well-sm"> 377 378 <div class="row"> 379 <div class="col-xs-3 text-center"> 380 @{ 381 var websiteLanguages = GetLoop("Languages"); 382 if (websiteLanguages.Count > 1) 383 { 384 foreach (var websiteLanguage in websiteLanguages) 385 { 386 var languageFlag = ""; 387 var languageClass = ""; 388 var languageCulture = websiteLanguage.GetString("Culture"); 389 var languagePageId = websiteLanguage.GetString("PageID"); 390 var languageFirstActivePageId = websiteLanguage.GetString("FirstActivePageID"); 391 392 var gotoPage = AreaHelper.ChangeLanguageUrl( 393 GetString("DwPageID"), 394 languagePageId, 395 GetString("DWExtranetAction"), 396 languageFirstActivePageId, 397 languageCulture 398 ); 399 400 if (!string.IsNullOrWhiteSpace(languageCulture)) 401 { 402 var languageCode = languageCulture.Split('-')[0]; 403 if (languageCode.Equals("en", StringComparison.InvariantCultureIgnoreCase)) 404 { 405 languageCode = "gb"; 406 } 407 languageFlag = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/Flags/{1}.svg", requestHostSearch, languageCode); 408 if (languageCulture.Equals(GetGlobalValue("Global:Area.LongLang"), StringComparison.InvariantCultureIgnoreCase)) 409 { 410 languageClass = "active"; 411 } 412 <a href="@gotoPage" class="@languageClass"><img src='@languageFlag' class="switch-language"></a> 413 } 414 } 415 } 416 417 } 418 </div> 419 <div class="col-xs-9"> 420 @if (!string.IsNullOrWhiteSpace(searchResultsPageId)) 421 { 422 var searchQuery = GetString("Ecom:Search.Query"); 423 <form class="search-form" action="default.aspx" method="get" name="GlobalSearchForm" id="desktopSearch"> 424 <input type="hidden" name="ID" value='@searchResultsPageId'> 425 <div class="input-group"> 426 <input type="text" name="q" autocomplete="off" class="form-control" required="required" maxlength="65" placeholder='@Translate("SearchPlaceholder", "Search")' value='@searchQuery' id="desktopSearchTerm"> 427 <span class="input-group-addon" id="btn-search-visible"> 428 <i class="fa fa-search"></i> 429 </span> 430 </div> 431 </form> 432 } 433 </div> 434 </div> 435 </div> 436 } 437 </div> 438 <div class="col-xs-2"> 439 @using System 440 @using Kwpn.Repository.Helpers 441 @using Kwpn.Models.Constants 442 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 443 @if (LoginHelper.CurrentUserIsLoggedIn()) 444 { 445 var currentUser = Kwpn.Repository.Repositories.KwpnUsers.CurrentUser(); 446 <div id="myaccountMenuWrapper"> 447 <button class="btn-lg btn-primary login-button" id="myaccountButton">@Translate("MyAccount", "My account")</button> 448 <div class="myaccountMenu hidden-xs hidden-sm" id="myaccountMenu" style='display: none;'> 449 @NavigationHelper.GetAccountNavigation( 450 StringConstants.NavigationTags.Account, 451 GetGlobalValue("Global:Page.ID"), 452 Translate("GoToMyDashboard", "Go to my dashboard"), 453 Translate("LogOff", "Log off"), 454 currentUser.IsBlocked 455 ) 456 </div> 457 </div> 458 } 459 else 460 { 461 var loginParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.LoginParagraphId); 462 if (!string.IsNullOrWhiteSpace(loginParagraphId) && Convert.ToInt32(loginParagraphId) > 0) 463 { 464 var loginPopupDisplay = "none"; 465 if (!string.IsNullOrWhiteSpace(LoginHelper.GetLoginError()) && 466 !GetGlobalValue("Global:Page.ID").Equals(AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.LoginPageId))) 467 { 468 loginPopupDisplay = "block"; 469 } 470 471 var loginAction = System.Web.HttpContext.Current.Request.QueryString.Get("LoginAction"); 472 if (!string.IsNullOrWhiteSpace(loginAction) && loginAction.Equals("Recovery", StringComparison.InvariantCultureIgnoreCase)) 473 { 474 // on password recovery the login module won't show. Probably due to duplicate input field names. 475 // in this case link to login page in stead of showing login form in layover 476 var loginPage = AreaHelper.CreateUrlBySystemName(StringConstants.PageIdSystemNames.LoginPageId); 477 var clickText = string.Format("{0} <i class='fa fa-spinner fa-spin'></i>", Translate("LogIn", "Log in")).JsEncode(); 478 <button class="btn-lg btn-primary login-button link" onclick="$(this).html('@clickText');window.location.href='@loginPage';">@Translate("LogIn", "Log in")</button> 479 } else { 480 <button class="btn-lg btn-primary login-button" onclick="$('.inloggenMenu').toggle();">@Translate("LogIn", "Log in")</button> 481 } 482 483 <div class="inloggenMenu hidden-xs hidden-sm" style='display: @loginPopupDisplay;'> 484 <a href="javascript:void(0);" class="close-login" onclick="$('.inloggenMenu').toggle();"><i class="fa fa-close"></i></a> 485 @RenderParagraphContent(Convert.ToInt32(loginParagraphId)) 486 </div> 487 } 488 } 489 </div> 490 </div> 491 </div> 492 @using Kwpn.Repository.Helpers 493 @using Kwpn.Models.Constants 494 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 495 <div class="container header_content hidden-xs hidden-sm"> 496 <div class="row"> 497 <div class="col-md-3 col-lg-4"> 498 <div class="logo"> 499 <a href='@NavigationHelper.GetHomepageUrl()' title='@Translate("GoToHomepage", "Go to the homepage").JsEncode()'><img src="/Files/Templates/Designs/Kwpn/images/kwpn-logo.svg"></a> 500 </div> 501 </div> 502 <div class="col-md-9 col-lg-8"> 503 <div class="row"> 504 <div class="header col-lg-12 visible-lg visible-md visible-sm"> 505 @NavigationHelper.GetMainNavigation(StringConstants.NavigationTags.Main, GetGlobalValue("Global:Page.ID"), Dynamicweb.Frontend.PageView.Current().Area.Culture) 506 </div> 507 </div> 508 </div> 509 </div> 510 @if (Dynamicweb.Frontend.PageView.Current().Page.ID.ToString().Equals(AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.HomepageId))) 511 { 512 <div class="row no-gutter"> 513 <div class="col-xs-12"> 514 <!-- /204473129/Homepage/Banner2 --> 515 <div id='div-gpt-ad-banner2-2' class="google-container google-container--size--a google-container--main-navigation"> 516 <script> 517 googletag.cmd.push(function() { googletag.display('div-gpt-ad-banner2-2'); }); 518 </script> 519 </div> 520 </div> 521 </div> 522 } 523 </div> 524 525 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 526 <div id="pagecontent" class="container" data-showmembership='@GetBoolean("Item.Page.ShowMembership")' data-showgotonavigation='@GetBoolean("Item.Page.ShowGotoNavigation")' data-showpartnerlogos='@GetBoolean("Item.Page.ShowCustomerLogos")'>@GetValue("DwContent(pagecontent)")</div> 527 @{ 528 if (!Kwpn.Repository.Helpers.LoginHelper.CurrentUserIsLoggedIn()) 529 { 530 var membershipParagraphId = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.ParagraphSystemNames.MembershipParagraphId); 531 if (!string.IsNullOrWhiteSpace(membershipParagraphId) && Convert.ToInt32(membershipParagraphId) > 0) 532 { 533 <div id="membershipwrapper">@RenderParagraphContent(Convert.ToInt32(membershipParagraphId))</div> 534 } 535 } 536 } 537 @using Kwpn.Models.Constants 538 @using Kwpn.Repository.Helpers 539 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 540 @{ 541 var newsletterParagraphId = int.Parse(AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.NewsletterParagraphId)); 542 } 543 <div class="container" id="footerlinks"> 544 <div class="row" id="goto-navigation"> 545 <div class="hidden-xs col-sm-6 col-md-3"> 546 <h3>@Translate("NavigationHeader_QuickLinksColumn1", "Directly to")</h3> 547 @GetValue("DwNavigation(navigationinternallinkscolumn1)") 548 </div> 549 <div class="hidden-xs col-sm-6 col-md-3"> 550 <h3>@Translate("NavigationHeader_QuickLinksColumn2", "Our products")</h3> 551 @GetValue("DwNavigation(navigationinternallinkscolumn2)") 552 </div> 553 <a name="newsletter"></a> 554 <div class="col-xs-12 col-sm-6 col-md-3"> 555 @if (newsletterParagraphId > 0) 556 { 557 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 558 @*If not logged in or logged in and not subscribed to the monthly newsletter, then show newsletter subscription*@ 559 <h3>@Translate("NewsletterSubscriptionHeader", "Stay informed")</h3> 560 <p>@Translate("NewsletterSubscriptionIntro", "Receive our monthly newsletter filled with updates, events, tips and tricks!")</p> 561 @*If logged in, then show button to profile page (with subscribe/unsubscribe checkbox)*@ 562 563 @RenderParagraphContent(newsletterParagraphId) 564 } 565 </div> 566 <div class="col-xs-12 col-sm-6 col-md-3"> 567 @using Kwpn.Models.Constants 568 @using Kwpn.Repository.Helpers 569 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 570 <h3>@Translate("NavigationHeader_SocialMedia", "Social media")</h3> 571 <ul> 572 @{ 573 var facebookUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Facebook); 574 if (!string.IsNullOrWhiteSpace(facebookUrl)) 575 { 576 <li class="facebook"><a href='@facebookUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Facebook", "Facebook")</a></li> 577 } 578 var instagramUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Instagram); 579 if (!string.IsNullOrWhiteSpace(instagramUrl)) 580 { 581 <li class="instagram"><a href='@instagramUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Instagram", "Instagram")</a></li> 582 } 583 var linkedInUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.LinkedIn); 584 if (!string.IsNullOrWhiteSpace(linkedInUrl)) 585 { 586 <li class="linkedIn"><a href='@linkedInUrl.JsEncode()' target="_blank">@Translate("SocialMedia_LinkedIn", "LinkedIn")</a></li> 587 } 588 var twitterUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Twitter); 589 if (!string.IsNullOrWhiteSpace(twitterUrl)) 590 { 591 <li class="twitter"><a href='@twitterUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Twitter", "Twitter")</a></li> 592 } 593 var youtubeUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.YouTube); 594 if (!string.IsNullOrWhiteSpace(youtubeUrl)) 595 { 596 <li class="youtube"><a href='@youtubeUrl.JsEncode()' target="_blank">@Translate("SocialMedia_YouTube", "YouTube")</a></li> 597 } 598 var vimeoUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Vimeo); 599 if (!string.IsNullOrWhiteSpace(vimeoUrl)) 600 { 601 <li class="vimeo"><a href='@vimeoUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Vimeo", "Vimeo")</a></li> 602 } 603 } 604 </ul> 605 </div> 606 </div> 607 </div> 608 @using Kwpn.Models.Constants 609 @using Kwpn.Repository.Helpers 610 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 611 @{ 612 var partnerLogosParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.PartnerLogoParagraphId); 613 var showPartnerLogos = !string.IsNullOrWhiteSpace(partnerLogosParagraphId) && Convert.ToInt32(partnerLogosParagraphId) > 0; 614 var sponsorLogosParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.SponsorLogoParagraphId); 615 var showSponsorLogos = !string.IsNullOrWhiteSpace(sponsorLogosParagraphId) && Convert.ToInt32(sponsorLogosParagraphId) > 0; 616 if (showPartnerLogos || showSponsorLogos) 617 { 618 <div class="container" id="footerlogos"> 619 @if (showPartnerLogos) 620 { 621 <div class="row logolist" id="partner-logos"> 622 <div class="col-xs-12 text-center"> 623 @RenderParagraphContent(Convert.ToInt32(partnerLogosParagraphId)) 624 </div> 625 </div> 626 } 627 @if (showSponsorLogos) 628 { 629 <div class="row logolist" id="sponsor-logos"> 630 <div class="col-xs-12 text-center"> 631 @RenderParagraphContent(Convert.ToInt32(sponsorLogosParagraphId)) 632 </div> 633 </div> 634 } 635 </div> 636 } 637 } 638 </div> 639 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 640 @{ 641 var requestHostFooter = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host")); 642 var footerLogo = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/kwpn-footer-logo.svg", requestHostFooter); 643 <div id="footerwrapper"> 644 <div class="container"> 645 <div class="row"> 646 <div class="col-xs-12 col-sm-12 col-md-10"> 647 @GetValue("DwNavigation(navigationfooter)") 648 </div> 649 <div class="hidden-xs hidden-sm col-md-2"> 650 <img src="@footerLogo" id="footer-logo"> 651 </div> 652 </div> 653 </div> 654 </div> 655 } 656 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 657 <div id="kwpnlink"> 658 <a href="@Kwpn.Repository.Helpers.KwpnTvHelper.GetKwpnTvLink()" target="_blank"><i class="fa fa-television" aria-hidden="true"></i><span>@Translate("KwnpTvLinkText", "Go to: KWPN TV")</span> <i class="fa fa-chevron-right"></i></a> 659 </div> 660 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 661 <div class="modal fade" id="equis-offline" tabindex="-1" role="dialog" aria-labelledby="equis-offline-modal" aria-hidden="true"> 662 <div class="modal-dialog"> 663 <div class="modal-content"> 664 <div class="modal-header">@Translate("EquisOffline_Modal_HeaderText", "Back office offline")</div> 665 <div class="modal-body"></div> 666 <div class="modal-footer"> 667 <a class="orange_balloon_link modal-ok" data-dismiss="modal" href="javascript:void(0);">@Translate("EquisOffline_Modal_OkButtonText", "Ok")</a> 668 </div> 669 </div> 670 </div> 671 </div> 672 @RenderSnippet("JavascriptsBottom") 673 <div class="overlay"></div> 674 @{ 675 var loginError = LoginHelper.GetLoginError(); 676 if (!string.IsNullOrWhiteSpace(loginError)) 677 { 678 <script> 679 $(document).ready(function () { 680 $(".loginErrorMessage span").text('@Translate(loginError, "Incorrect membership number or password")'); 681 $(".loginErrorMessage span").show(); 682 }); 683 </script> 684 } 685 <script> 686 $(document).ready(function () { 687 // note: prevent copying text by using right click function on master's body tag 688 // check if page is market 689 $(".marketplace-page")[0] ? localStorage.setItem("marketPlace", true) : localStorage.removeItem("marketPlace"); 690 691 // tooltip initializer 692 $("[data-toggle='tooltip']").tooltip(); 693 694 // prevent right click on images 695 $('img').on('contextmenu', function () { 696 return false; 697 }); 698 $(".photo").on('contextmenu', function () { 699 return false; 700 }); 701 $(".fancybox-image").on('contextmenu', function () { 702 return false; 703 }); 704 705 @{ 706 // seo login, log when user logs in succesfully 707 var loginStatus = System.Web.HttpContext.Current.Session[Kwpn.Models.Constants.StringConstants.SessionVariables.LoginStatus]; 708 if (loginStatus != null && loginStatus.Equals(Kwpn.Models.Enumerations.LoginStatus.OK)) 709 { 710 System.Web.HttpContext.Current.Session[Kwpn.Models.Constants.StringConstants.SessionVariables.LoginStatus] = Kwpn.Models.Enumerations.LoginStatus.OKDone; 711 var seoPageview = string.Format("/{0}/{1}", GetGlobalValue("Global:Area.LongLang").ToLower(), Translate("SEO_TrackPageviewPage_UserLoggedIn", "logged-in")); 712 <Text> 713 SEO.trackPageView("@seoPageview"); 714 </Text> 715 } 716 } 717 718 // seo original pageview tracking 719 SEO.trackOriginalView(); 720 }); 721 </script> 722 } 723 </body> 724 </html>