Error executing template "Designs/KoksGroup/_parsed/NewsPage.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_346f987045d648baa78dd3b1221240ff.Execute() in D:\virtual_hosts\koksgroup.nl Production\files\Templates\Designs\KoksGroup\_parsed\NewsPage.parsed.cshtml:line 20
   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 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb; 3 @using Bluedesk.Tools.Generic; 4 @using System.Globalization; 5 @using Dynamicweb.Content.Items; 6 @using Bluedesk.DynamicWeb.ItemTypes; 7 @using Bluedesk.DynamicWeb.ItemTypes.Settings; 8 @using Dynamicweb.Configuration; 9 @using KoksGroup.DynamicWeb.ItemTypes.Settings; 10 @using Bluedesk.DynamicWeb.ItemTypes.BaseSolution; 11 12 @{ 13 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 14 var ogurl = string.Format("{0}{1}", httpdomain, GetGlobalValue("Global:Pageview.Url")); 15 var lang = GetString("LongLang").Split('-')[0]; 16 17 var websitesettings = Services.Items.GetItemById<WebsiteSettings>(Pageview.AreaID.ToString()); 18 19 var corporate_settings = Services.Pages.GetPageByNavigationTag(Pageview.AreaID, "CorporateSettingsPage"); 20 CorporateSettingsPage cs = corporate_settings.Item.ToCodeFirstItem<CorporateSettingsPage>(); 21 22 string translatePrefix = Pageview.Area.Name.Replace(" ", "").ToLower(); 23 24 //string logo = websitesettings.Logo; 25 //var phonenumber = cs.Phonenumber; 26 //var formattedPhonenumber = phonenumber.Replace(" ", String.Empty); 27 var emailadress = cs.Emailadress; 28 var buttonIconClass = Pageview.Area.Item["Global_button_icon"] != null ? Pageview.Area.Item["Global_button_icon"].ToString().Replace("+", " ") : "fal fa-arrow-right"; 29 var callmebackformlink = cs.Call_me_back_form; 30 31 bool isOffline = false; 32 DateTime workingHoursStart = cs.OpeningTime; 33 DateTime workingHoursEnd = cs.ClosingTime; 34 DateTime today = DateTime.Now; 35 var cHour = DateTime.Now.TimeOfDay; 36 int cDay = (int)DateTime.Now.DayOfWeek; 37 string availableToHour24hFormat = workingHoursEnd.TimeOfDay.ToString().Substring(0, 5); 38 var timeFromInput = DateTime.ParseExact(availableToHour24hFormat, "H:m", null, DateTimeStyles.None); 39 string availableToHour12hFormat = timeFromInput.ToString("hh:mm tt", CultureInfo.InvariantCulture); 40 var availableToHour = lang == "en" ? availableToHour12hFormat : availableToHour24hFormat; 41 bool isOvertime = cHour >= workingHoursEnd.TimeOfDay || cHour <= workingHoursStart.TimeOfDay; 42 bool isNoValidDate = today < workingHoursStart || today > workingHoursEnd; 43 if (isNoValidDate || isOvertime) 44 { 45 isOffline = true; 46 } 47 48 var languages = GetLoop("Languages"); 49 var qs = HttpUtility.ParseQueryString(System.Web.HttpContext.Current.Request.QueryString.ToString()); 50 51 string newsTitle = Pageview.Page.Item["Title"] != null ? Pageview.Page.Item["Title"].ToString() : ""; 52 string newsImg = Pageview.Page.Item["Image"] != null ? Pageview.Page.Item["Image"].ToString() : ""; 53 string newsImgAlt = Pageview.Page.Item["ImageAlt"] != null ? Pageview.Page.Item["ImageAlt"].ToString() : ""; 54 string newsImgHeight = Pageview.Page.Item["ImageHeight"] != null ? Pageview.Page.Item["ImageHeight"].ToString() + "px" : ""; 55 if (string.IsNullOrWhiteSpace(newsImgHeight) || newsImgHeight == "px") 56 { 57 newsImgHeight = "400px"; 58 } 59 string newsDate = Pageview.Item["Date"] != null ? Convert.ToDateTime(Pageview.Item["Date"]).ToString("d MMMM yyyy") : ""; 60 string newsReadTime = Pageview.Page.Item["ReadingTime"] != null ? Pageview.Page.Item["ReadingTime"].ToString() : ""; 61 string newsCategoryId = Pageview.Page.Item["Category"] != null ? Pageview.Page.Item["Category"].ToString() : ""; 62 var newsCategory = ItemManager.Storage.GetById("NewsCategory", newsCategoryId); 63 64 string authorName = Pageview.Page.Item["AuthorName"] != null ? Pageview.Page.Item["AuthorName"].ToString() : ""; 65 string authorImage = Pageview.Page.Item["AuthorImage"] != null ? Pageview.Page.Item["AuthorImage"].ToString() : ""; 66 string authorDescription = Pageview.Page.Item["AuthorDescription"] != null ? Pageview.Page.Item["AuthorDescription"].ToString() : ""; 67 68 var summaryListId = Convert.ToInt32(Pageview.Page.Item["SummaryLinks"]); 69 var summaryList = ItemList.GetItemListById(summaryListId).Relations; 70 71 string newsAuthorId = Pageview.Page.Item["Author"] != null ? Pageview.Page.Item["Author"].ToString() : ""; 72 var newsAuthor = ItemManager.Storage.GetById("NewsAuthor", newsAuthorId); 73 74 var tags = Pageview.Page.Item["Tags"] != null ? Pageview.Page.Item["Tags"].ToString().Split(',').ToList() : null; 75 76 } 77 <!DOCTYPE html> 78 <html lang="@lang"> 79 <head prefix="og: http://ogp.me/ns#"> 80 <meta charset="utf-8"> 81 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 82 <meta name="viewport" content="width=device-width, initial-scale=1"> 83 <meta name="theme-color" content="#ff5800"> 84 85 <meta property="og:site_name" content="@Pageview.Area.Name"> 86 <meta property="og:url" content="@ogurl"> 87 88 @RenderSnippet("ogTags") 89 90 @RenderSnippet("NextPrev") 91 92 <title>@GetValue("Title")</title> 93 @GetValue("MetaTags") 94 @GetValue("CopyRightNotice") 95 96 97 @if (languages.Any()) 98 { 99 foreach (var language in languages) 100 { 101 var Culture = language.GetString("Culture"); 102 int pageId = language.GetInteger("PageID"); 103 104 int areaId = language.GetInteger("ID"); 105 Area area = Dynamicweb.Content.AreaService.Repository.GetArea(areaId); 106 var areaItem = area.Item; 107 bool draftMode = areaItem != null ? Dynamicweb.Input.FormatBoolean(areaItem["Draft_Mode"]) : false; 108 109 110 111 112 qs.Set("ID", pageId.ToString()); 113 string url = "Default.aspx"; 114 foreach (string key in qs) 115 { 116 var value = qs[key]; 117 url = url.Contains("?") ? string.Format("{0}&{1}={2}", url, key, value) : string.Format("{0}?{1}={2}", url, key, value); 118 } 119 120 string alternateLink = httpdomain + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(url); 121 122 var isproductURL = !String.IsNullOrEmpty(HttpContext.Current.Request.QueryString.Get("ProductID")); 123 bool isActive = true; 124 125 if (draftMode) 126 { 127 continue; 128 } 129 130 131 if (isproductURL) 132 { 133 134 var productService = new Dynamicweb.Ecommerce.Products.ProductService(); 135 var qsProductId = HttpContext.Current.Request.QueryString.Get("ProductID"); 136 var languageID = area.EcomLanguageId; 137 138 139 var product = productService.GetProductById(qsProductId, "", languageID); 140 141 isActive = product?.Active ?? false; 142 143 if (isActive == true && pageId != 0) 144 { 145 <link rel="alternate" hreflang="@Culture.ToLower()" href="@alternateLink"> 146 } 147 148 } 149 else if (pageId != 0) 150 { 151 <link rel="alternate" hreflang="@Culture.ToLower()" href="@alternateLink"> 152 } 153 154 155 156 157 158 159 } 160 } 161 <link href="https://fonts.googleapis.com/css?family=Arvo:400,400i,700,700i" rel="stylesheet"> 162 <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,600,600i,700&amp;subset=latin-ext" rel="stylesheet"> 163 <link href="/Files/Templates/Designs/KoksGroup/dist/css/style.min.css?version=1.1.3" rel="stylesheet"> 164 <link href="/Files/Templates/Designs/KoksGroup/dist/app.css" rel="stylesheet"> 165 <link rel="icon" href="/Files/Templates/Designs/KoksGroup/img/favicon.ico" type="image/x-icon"> 166 167 <script type="text/javascript"> 168 var areaID = @Pageview.AreaID; 169 var OrderID = '@GetString("Ecom:Order.ID")'; 170 window.globals = { 171 pageId: '@Pageview.ID', 172 DW_AREA_CULTURE: '@GetString("LongLang")', 173 DW_AREA_CULTURE_SHORT: '@lang' 174 }; 175 </script> 176 177 @GetString("Item.Area.Script_Head") 178 179 180 @renderRichSnippetKoks() 181 182 @renderReviewSnippetKoks() 183 184 185 @GetValue("Stylesheets") 186 @GetValue("Javascripts") 187 </head> 188 189 <body> 190 191 @GetString("Item.Area.Script_Body") 192 @GetString("Item.Area.GoogleTagManager") 193 194 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 195 @using Dynamicweb; 196 197 198 @{ 199 var phonenumber = GetString("Item.Area.Phonenumber"); 200 string logo = GetString("Item.Area.Logo"); 201 string logoAlt = GetString("Item.Area.Logo_Alt"); 202 string motto = GetString("Item.Area.Motto"); 203 204 int ResellerFormPage = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("BecomeReseller", Pageview.AreaID); 205 var productsPage = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("products", Pageview.AreaID); 206 207 string productOfferLink = GetString("Item.Area.ProductOffer.Value"); 208 209 string AreaFirstPage = GetString("Item.Area.AreaFirstPage"); 210 string callMeBackLink = GetString("Item.Area.CallMeBack"); 211 string imageCompression = "Admin/Public/GetImage.ashx?Image=" + logo + "&Compression=70&width=300&height=70"; 212 var logoImageALT = !string.IsNullOrEmpty(logo) ? logo.Split('/').Last().Replace(".jpg", "").Replace(".png", "").Replace("-", " ").Replace("_", " ") : ""; 213 214 int SearchPageID = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("KoksSearchresults", Pageview.AreaID); 215 var SearchPlaceholder = Translate("Searchbox.Placeholder", "Search..."); 216 var SearchPrefill = Dynamicweb.Context.Current.Request["q"]; 217 var SearchboxClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "open" : ""; 218 var SearchtoggleClass = !string.IsNullOrWhiteSpace(SearchPrefill) ? "close" : ""; 219 bool enableMegamenu = GetBoolean("Item.Area.EnableMegamenu"); 220 } 221 222 <header class="header"> 223 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 224 @using Dynamicweb; 225 @using Bluedesk.Tools.DynamicWeb.Generic; 226 227 228 <section class="topmenu"> 229 <div class="topmenu__container"> 230 <ul class="top-usps"> 231 <li class="top-usps__item">@GetString("Item.Area.USP_1.Value")</li> 232 <li class="top-usps__item">@GetString("Item.Area.USP_2.Value")</li> 233 <li class="top-usps__item">@GetString("Item.Area.USP_3.Value")</li> 234 </ul> 235 236 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 237 @using System.Web; 238 @using Dynamicweb.Content; 239 @using Dynamicweb.Extensibility; 240 @using System.Globalization; 241 242 @{ 243 var delearLocatorPage = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("dealerlocator", Pageview.AreaID); 244 var workAtLink = GetString("Item.Area.WorkAtLink"); 245 bool hideCareer = GetBoolean("Item.Area.HideCareer") != null ? GetBoolean("Item.Area.HideCareer") : false; 246 bool hideWebshop = GetBoolean("Item.Area.HideWebshop") != null ? GetBoolean("Item.Area.HideWebshop") : false; 247 bool hideCompanies = GetBoolean("Item.Area.HideCompanies") != null ? GetBoolean("Item.Area.HideCompanies") : false; 248 bool hideLanguage = GetBoolean("Item.Area.HideLanguageSwitcher") != null ? GetBoolean("Item.Area.HideLanguageSwitcher") : false; 249 bool hideDealer = GetBoolean("Item.Area.HideLocateDealer") != null ? GetBoolean("Item.Area.HideLocateDealer") : false; 250 bool hideLogin = GetBoolean("Item.Area.HideMyLogin") != null ? GetBoolean("Item.Area.HideMyLogin") : false; 251 252 var pageService = ServiceLocator.Current.GetInstance<IPageService>(); 253 254 var obj_pageViewCurrent = Dynamicweb.Frontend.PageView.Current(); 255 string areaID = obj_pageViewCurrent.AreaID.ToString(); 256 string countryCode = GetGlobalValue("Global:Area.Culture.CountryCode"); 257 258 var areaCurrent = Pageview.Area; 259 CultureInfo cultureCurrent = CultureInfo.GetCultureInfo(areaCurrent.Culture); 260 string currentCultureFlag = string.Format("/Admin/Images/Flags/flag_{0}.png", areaCurrent.Culture.Substring(3, 2).ToLower()); 261 262 string currentHost = GetGlobalValue("Global:Request.Host"); 263 264 bool hasMyAccountMenu = GetPageIdByNavigationTag("MyAccountMenu").ToString() != "0"; 265 266 } 267 268 <div class="top-toggles"> 269 @if (!hideDealer && delearLocatorPage > 0) 270 { 271 <a href="/Default.aspx?ID=@delearLocatorPage" class="top-toggles__workat">@Translate(translatePrefix + "DealerLocator", "Dealerlocator")</a> 272 } 273 @if (!hideCareer) 274 { 275 <a href="@workAtLink" class="top-toggles__workat">@Translate(translatePrefix + "WorkAt", "work at")</a> 276 } 277 @if (!hideWebshop || !hideLanguage) 278 { 279 <div class="language"> 280 <div class="dropdown"> 281 @if (!hideWebshop) 282 { 283 <button class="btn dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> 284 @Translate(translatePrefix + "Webshop", "Webshop") 285 </button> 286 <ul class="language-dropdown" role="menu" aria-labelledby="languageselect"> 287 @GetValue("DwNavigation(webshopmenu)") 288 </ul> 289 } 290 </div> 291 </div> 292 } 293 294 @if (!hideCompanies) 295 { 296 <div class="language"> 297 <div class="dropdown"> 298 <button class="btn dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> 299 @Translate(translatePrefix + "Topmenu.Companies", "Companies") 300 </button> 301 302 <ul class="language-dropdown" role="menu" aria-labelledby="languageselect"> 303 @{ 304 var masterAreas = Dynamicweb.Services.Areas.GetMasterAreas().Where(x => x.ID != Pageview.AreaID 305 && x.ID != Pageview.Area.MasterAreaId 306 && x.Item != null 307 && x.ItemType == "WebsiteSettings" 308 && !(bool)x.Item["Draft_Mode"]); 309 foreach (Area masterarea in masterAreas) 310 { 311 312 Area matchLang = masterarea.Languages.FirstOrDefault(x => x.Culture == Pageview.Area.Culture && !(bool)x.Item["Draft_Mode"]); 313 Area area = (matchLang == null) ? masterarea : matchLang; 314 315 int homepageid = Dynamicweb.Services.Pages.GetFirstPageForArea(area.ID).ID; 316 string target = (area.DomainLock != currentHost) ? "_blank" : "_self"; 317 string nameClean = masterarea.Name.Replace("(Master)", ""); 318 319 string url = $"//{area.DomainLock}/Default.aspx?ID={homepageid}&switchLanguage={area.Culture}"; 320 321 <li><a href="@url" target="@target" title="@nameClean">@nameClean</a></li> 322 } 323 } 324 @{ 325 string euromUrl = $"//koks.com/Default.aspx?ID=21670&switchLanguage={areaCurrent.Culture}"; 326 } 327 <li><a href="@euromUrl" target="_blank" title="EUROM s.r.o.">EUROM s.r.o.</a></li> 328 </ul> 329 </div> 330 </div> 331 } 332 333 @if (!hideLanguage) 334 { 335 <div class="language languages"> 336 <button class="btn dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> 337 <span class="flag" style="background-image: url('@currentCultureFlag');"></span> 338 </button> 339 <ul class="language-dropdown" role="menu" aria-labelledby="languageselect"> 340 @foreach (var language in GetLoop("Languages")) 341 { 342 Area targetArea = Dynamicweb.Content.AreaService.Repository.GetArea(language.GetInteger("ID")); 343 if (Convert.ToBoolean(targetArea.Item["Draft_Mode"] ?? false)) 344 { 345 continue; 346 } 347 string pageUrl = GetLanguageSwitchUrl(language); 348 string isCurrent = language.GetBoolean("IsCurrent") ? "selected " : ""; 349 string cultureFlag = string.Format("/Admin/Images/Flags/flag_{0}.png", targetArea.Culture.Substring(3, 2).ToLower()); 350 351 <li role="presentation" data-current="@isCurrent" class="@isCurrent"> 352 <a role="menuitem" tabindex="-1" href='@pageUrl' title="@targetArea.Name" style="background-image: url(@cultureFlag);" class="languageswitch"> 353 @GetLanguageLabel(targetArea.Culture) 354 </a> 355 </li> 356 357 } 358 </ul> 359 </div> 360 } 361 @if (!hideLogin) 362 { 363 if (Pageview.User == null) 364 { 365 <a href="javascript:void(0);" class="top-toggles__login"><span class="hidden-sm-down">@Translate(translatePrefix + "Header.Login", "Login")</span></a> 366 } 367 else 368 { 369 if (hasMyAccountMenu) 370 { 371 <div class="language"> 372 <div class="dropdown"> 373 <button class="btn dropdown-toggle" type="button" data-toggle="dropdown" aria-expanded="true"> 374 @Translate(translatePrefix + "Header.MyAccount", "MyAccount") 375 </button> 376 <ul class="language-dropdown" role="menu" aria-labelledby="languageselect"> 377 @GetValue("DwNavigation(myaccountmenu)") 378 <li class="__item" name="option-last"> 379 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" class="__link">@Translate(translatePrefix + "Header.Logout", "Logout")</a> 380 </li> 381 </ul> 382 </div> 383 </div> 384 } 385 else 386 { 387 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" class="hidden-sm-down top-toggles__logout">@Translate(translatePrefix + "Header.Logout", "Logout")</a> 388 } 389 } 390 } 391 </div> 392 393 @functions { 394 public string GetLanguageSwitchUrl(LoopItem language) 395 { 396 397 // Get page on targeted language 398 Area targetArea = Dynamicweb.Content.AreaService.Repository.GetArea(language.GetInteger("ID")); 399 int homepageid = language.GetInteger("FirstActivePageID"); 400 int targetPageId = language.GetInteger("PageID") > 0 ? language.GetInteger("PageID") : homepageid; 401 402 // Create parameters 403 var qparams = new Dictionary<string, object>(StringComparer.InvariantCultureIgnoreCase); 404 qparams.Add("ID", targetPageId); 405 qparams.Add("AreaID", targetArea.ID); 406 qparams.Add("switchLanguage", targetArea.Culture); 407 408 // Check if on ProductDetail 409 var productId = HttpContext.Current.Request.QueryString.Get("ProductID"); 410 if (!String.IsNullOrEmpty(productId)) 411 { 412 var product = Dynamicweb.Ecommerce.Services.Products.GetProductById(productId, "", targetArea.EcomLanguageId); 413 if (product == null || !product.IsActive) 414 { 415 // Product not found in lang, fallback to home 416 qparams["ID"] = homepageid; 417 qparams.Add("ProductId", ""); 418 } 419 else 420 { 421 qparams.Add("ProductId", product.IdUrlEncoded); 422 } 423 } 424 425 // Add missing parameters from current url 426 foreach (var i in System.Web.HttpContext.Current.Request.QueryString.AllKeys) 427 { 428 if (i != null && !qparams.ContainsKey(i)) 429 { 430 qparams.Add(i, System.Web.HttpContext.Current.Request.QueryString[i]); 431 } 432 } 433 434 435 // Build RawUrl 436 string url = "Default.aspx?"; 437 foreach (var p in qparams) 438 { 439 url += $"{p.Key}={p.Value}&"; 440 } 441 442 return url; 443 } 444 } 445 446 @helper GetLanguageLabel(string strCulture) 447 { 448 switch (strCulture) 449 { 450 case "en-GB": 451 @Translate("English", "English") 452 break; 453 case "en-US": 454 @Translate("EnglishUS", "English (US)") 455 break; 456 case "nl-NL": 457 @Translate("Dutch", "Nederlands") 458 break; 459 case "de-DE": 460 @Translate("Deutsch", "Deutsch") 461 break; 462 case "fr-FR": 463 @Translate("French", "Français") 464 break; 465 case "cs-CZ": 466 @Translate("Czech", "Čeština") 467 break; 468 case "es-ES": 469 @Translate("Spanish", "Español") 470 break; 471 default: 472 @Translate("Language", "Language") 473 break; 474 } 475 } 476 477 </div> 478 </section> 479 480 <section class="header__container clearfix"> 481 <div class="col-xs-12 col-md-4"> 482 <a href="/Default.aspx?ID=@AreaFirstPage" class="logo"> 483 <figure class="logo"> 484 <picture class="cta-paragraph__image bg-cover"> 485 <source media="(max-width: 480px)" srcset="/Admin/Public/GetImage.ashx?Image=@logo&amp;Crop=0&amp;Width=100&amp;Compression=80"> 486 <source media="(max-width: 994px)" srcset="/Admin/Public/GetImage.ashx?Image=@logo&amp;Crop=0&amp;Width=400&amp;Compression=80"> 487 <img src="/Admin/Public/GetImage.ashx?Image=@logo&amp;Crop=0&amp;Width=500&amp;Compression=80" alt="@logoImageALT" class="cta-paragraph__image bg-cover"> 488 </picture> 489 </figure> 490 </a> 491 </div> 492 493 <div class="col-xs-12 col-md-6 header__cta-wrapper hidden-md-down"> 494 <form class="searchbox__form open @SearchboxClass" method="get" action="/Default.aspx"> 495 <input type="hidden" name="ID" value="@SearchPageID"> 496 <input type="text" name="q" value="@SearchPrefill" placeholder="@SearchPlaceholder" class="searchbox__input"> 497 <button type="submit" class="searchbox__btn"></button> 498 </form> 499 500 <a href="@productOfferLink" class="btn btn-orange header__cta"> 501 <span>@Translate(translatePrefix + "Header.AskForOffer", "Ask for offer")</span> 502 <i class="fa fa-angle-right header__cta-icon"></i> 503 </a> 504 </div> 505 506 <div class="col-xs-12 flex header__mainmenu col-md-2"> 507 @* Hidden in sticky menu *@ 508 <a href="javascript:void(0);" id="searchbox-toggle" class="header__search hidden-md-up"></a> 509 <div class="logo--dummy hidden-md-up"></div> 510 511 @if (isOffline) 512 { 513 <a href="@(callMeBackLink)" class="btn btn-white-grey header__call-me-back">@Translate("Header.CallMeBack", "Call me back")</a> 514 } 515 else 516 { 517 <a href="tel:@phonenumber" class="header__phonenr">@phonenumber</a> 518 } 519 520 <a href="javascript:void(0);" class="header__hamburger hidden-md-up"></a> 521 </div> 522 </section> 523 524 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 525 @using Dynamicweb; 526 @{ 527 var myAccountPageId = Pageview.User != null ? PageHelper.GetPageIDByNavigationTag("MyAccountMenu", Pageview.AreaID) : PageHelper.GetPageIDByNavigationTag("SignIn", Pageview.AreaID); 528 string mainmenuClass = enableMegamenu ? "mainmenu__megamenu" : ""; 529 } 530 <section class="mainmenu @mainmenuClass"> 531 532 @if(enableMegamenu) 533 { 534 <header-menu id="header-menu"> 535 <ul class="mainmenu__list container"> 536 @GetValue("DwNavigation(megamainmenu)") 537 </ul> 538 </header-menu> 539 540 <mobile-menu id="mobile-menu"> 541 </mobile-menu> 542 } 543 else 544 { 545 <ul class="mainmenu__list container"> 546 @GetValue("DwNavigation(mainmenu)") 547 </ul> 548 } 549 550 <a href="javascript:;" class="searchbox__toggle hidden-lg hidden-md @SearchtoggleClass"></a> 551 552 <div class="hidden-md-up mainmenu__list--extra"> 553 <div class="u-margin-top"> 554 @if (!hideWebshop || !hideLanguage) 555 { 556 <ul class="mainmenu__list" style="margin-top: 15px;"> 557 <li class="mainmenu__item"> 558 <a class="mainmenu__link has-sub-menu">@Translate(translatePrefix + "Webshop", "Webshop")</a> 559 560 @GetValue("DwNavigation(webshopmenumobile)") 561 </li> 562 563 @if (!hideCareer) 564 { 565 <li class="mainmenu__item"><a href="@workAtLink" class="mainmenu__link">@Translate(translatePrefix + "WorkAt", "work at")</a></li> 566 } 567 568 @if (!hideDealer) 569 { 570 <li class="mainmenu__item"><a href="Default.aspx?ID=@delearLocatorPage" class="mainmenu__link">@Translate(translatePrefix + "Header.DealerLocator", "DEALERLOCATOR")</a></li> 571 } 572 573 @if (!hideLogin) 574 { 575 <li class="mainmenu__item"><a href="Default.aspx?ID=@myAccountPageId" class="mainmenu__link">@Translate(translatePrefix + "Header.MyAccount", "MyAccount")</a></li> 576 } 577 </ul> 578 } 579 </div> 580 </div> 581 </section> 582 583 584 <div class="searchbox-mobile @SearchboxClass hidden-md-up"> 585 <form class="searchbox-mobile__form" method="get" action="/Default.aspx"> 586 <input type="hidden" name="ID" value="@SearchPageID"> 587 <input type="text" name="q" value="@SearchPrefill" placeholder="@SearchPlaceholder" class="searchbox__input"> 588 <button type="submit" class="searchbox-mobile__btn"></button> 589 </form> 590 </div> 591 592 593 <section class="dropdowns"> 594 <div class="dropdowns__backdrop"></div> 595 596 <div class="dropdowns__container"> 597 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 598 @using Dynamicweb; 599 @using Bluedesk.Tools.DynamicWeb.Generic; 600 601 @{ 602 var shopurl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(PageHelper.GetPageIDByNavigationTag("Shop", Pageview.AreaID)); 603 var checkouturl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(PageHelper.GetPageIDByNavigationTag("Checkout", Pageview.AreaID)); 604 } 605 606 607 <div class="shoppingcart" id="shopping-cart-app"> 608 <shoppingcart shopurl="@shopurl" checkouturl="@checkouturl" translate-emptycart='@Translate("Shoppingcart.EmptyCartMessage", "No products in cart")' translate-quantity='@Translate("Shoppingcart.Quantity", "Quantity")' translate-total='@Translate("Shoppingcart.Total", "Total")' translate-discount='@Translate("Shoppingcart.Discount", "Discount")' translate-vat='@Translate("Shoppingcart.VAT", "VAT")' translate-totalwithvat='@Translate("Shoppingcart.TotalWithVAT", "Total with VAT")' translate-backtoshop='@Translate("Shoppingcart.BackToShop", "Back to shop")' translate-gotocheckout='@Translate("Shoppingcart.GoToCheckout", "Go to Checkout")'></shoppingcart> 609 </div> 610 @if (Pageview.User == null) 611 { 612 int PasswordForgetPage = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("Extranet.ForgotPassword", Pageview.AreaID); 613 int RegisterPage = Bluedesk.Tools.DynamicWeb.Generic.PageHelper.GetPageIDByNavigationTag("Extranet.Register", Pageview.AreaID); 614 615 <section class="login-box"> 616 <form class="login-box__form"> 617 <div class="login-box__messagebox" data-failedmessage='@Translate("LoginBox.LoginFailed", "Login failed..")'></div> 618 619 <label class="login-box__label"> 620 @Translate("LoginBox.EmailOrUsername", "E-mail / Username")<br> 621 <input type="text" id="login-box__username" name="username" class="login-box__input" required="" tabindex="10"> 622 </label> 623 624 <label class="login-box__label"> 625 @Translate("LoginBox.Password", "Password")<br> 626 <input type="password" id="login-box__password" name="password" class="login-box__input" required="required" tabindex="20"> 627 </label> 628 629 <button type="submit" class="login-box__btn" tabindex="30"> @Translate("LoginBox.Login", "Log in")</button> 630 631 <!-- <label class="checkbox__label"> 632 <input type="checkbox" value="true" id="login-box__rememberme" class="checkbox__input" /> 633 <span class="checkbox__span">@Translate("LoginBox.RememberMe", "Remember me")</span> 634 </label> --> 635 </form> 636 637 <a href="/Default.aspx?ID=@PasswordForgetPage" class="login-box__extralink">@Translate("LoginBox.ForgotPassword", "Forgotten password?")</a> 638 <a href="/Default.aspx?ID=@RegisterPage" class="login-box__extralink">@Translate("LoginBox.Register", "Register")</a> 639 </section> 640 } 641 </div> 642 </section> 643 </header> 644 645 @if(enableMegamenu) { 646 <div id="backdrop-megamenu"></div> 647 <mega-menu id="mega-menu"></mega-menu> 648 } 649 650 651 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 652 @using Dynamicweb; 653 @using Bluedesk.DynamicWeb.ItemTypes.Pages; 654 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 655 656 @{ 657 var contentHead = (Pageview.Page.Item != null && Pageview.Page.ItemType.Equals("DefaultPage")) ? ItemExtensions.CreateFrom<DefaultPage>(Pageview.Page.Item) : new DefaultPage(); 658 } 659 660 @* @if (!string.IsNullOrWhiteSpace(contentHead.Header)) 661 { 662 <section class="defaultpage__header container"> 663 @contentHead.HeaderFormatted() 664 </section> 665 } *@ 666 667 @if (!string.IsNullOrWhiteSpace(contentHead.Image.Image)) 668 { 669 var imageClass = (contentHead.Image != null) ? string.Format("{0} {1}", contentHead.Image.PositionX, contentHead.Image.PositionY) : ""; 670 671 <section class="container-fluid"> 672 <div class="row"> 673 <figure class="defaultpage__photo @imageClass" style="background-image: url('@contentHead.Image.Image');"></figure> 674 </div> 675 </section> 676 } 677 678 @if (contentHead.ShowBreadCrumbs || Pageview.Page.ItemType.Equals("NewsSection") || Pageview.Page.ItemType.Equals("NewsArticle")) 679 { 680 <section class="container-fluid" style="border-bottom: 1px solid #e1e2e1;"> 681 <div class="row"> 682 <div class="container"> 683 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 684 @using Dynamicweb; 685 686 <nav class="breadcrumbs" id="breadcrumbs"> 687 <span class="breadcrumbs__text">@Translate("Breadcrumbs.YouAreHere", "You are here")</span> 688 @GetValue("DwNavigation(breadcrumblist)") 689 </nav> 690 691 </div> 692 </div> 693 </section> 694 } 695 696 697 <main> 698 699 @GetValue("DwContent(Beforebreadcrumb)") 700 701 <div class="newspage"> 702 <div class="container"> 703 <section class="newspage__innerwrapper"> 704 705 @if (summaryList.Any()) 706 { 707 <aside class="newspage__sidebar"> 708 <p class="newspage__sidebar-title">In dit artikel</p> 709 <nav> 710 <ol class="newspage__sidebar-list"> 711 @{ var index = 1; } 712 @foreach (Item item in summaryList) 713 { 714 <li class="newspage__sidebar-list-item"> 715 <a href="#@item[" link"]"="" class="newspage__sidebar-list-item--link"> 716 <span class="newspage__sidebar-list-item--counter">@index</span> 717 @item["Name"] 718 </a> 719 </li> 720 index++; 721 } 722 </ol> 723 </nav> 724 <div class="newspage__sharebtn__container"> 725 <button type="button" class="newspage__sharebtn" data-tooltip="URL gekopieerd"> 726 <i class="newspage__sharebtn__icon fas fa-share-alt"></i> 727 <span class="newspage__sharebtn__text">Artikel delen</span> 728 </button> 729 </div> 730 </aside> 731 } 732 733 <article class="newspage__article"> 734 <header class="newspage__header"> 735 <figure class="newspage__header__image" style="--imageheight: @newsImgHeight;"> 736 <img src="@newsImg" alt="@newsImgAlt"> 737 </figure> 738 @if (!string.IsNullOrWhiteSpace(newsAuthorId)) 739 { 740 <div class="newspage__header__author"> 741 <figure class="newspage__header__author-img"> 742 <img src='@newsAuthor["Image"]' alt='@newsAuthor["Name"]'> 743 </figure> 744 <p class="newspage__header__author-name">@newsAuthor["Name"]</p> 745 </div> 746 } 747 <div class="newspage__header__meta"> 748 <p class="newspage__header__meta--info">@string.Format("{0} in {1}", newsDate, newsCategory["Label"])</p> 749 <div class="newspage__header__meta--data"> 750 @if (!string.IsNullOrWhiteSpace(newsReadTime)) 751 { 752 <p class="newspage__header__meta-time"><i class="fal fa-clock"></i> @newsReadTime. leestijd</p> 753 } 754 <button type="button" class="newspage__sharebtn newspage__sharebtn--inline newspage__header__meta-share" data-tooltip="URL gekopieerd"> 755 <i class="newspage__sharebtn__icon fas fa-share-alt"></i> 756 <span class="newspage__sharebtn__text">Artikel delen</span> 757 </button> 758 </div> 759 </div> 760 <h1 class="newspage__header__title">@newsTitle</h1> 761 </header> 762 763 @GetValue("DwContent(articlecontent)") 764 765 @if (!string.IsNullOrWhiteSpace(newsAuthorId)) 766 { 767 <footer class="newspage__author-bio"> 768 <div class="newspage__author-bio__header"> 769 <figure class="newspage__author-bio__image"> 770 <img src='@newsAuthor["Image"]' alt='@newsAuthor["Name"]'> 771 </figure> 772 <div class="newspage__author-bio__meta"> 773 <p>Over de schrijver</p> 774 <p class="newspage__author-bio__authorname">@newsAuthor["Name"]</p> 775 </div> 776 </div> 777 <div class="newspage__author-bio__content"> 778 @newsAuthor["Description"] 779 </div> 780 </footer> 781 } 782 783 @if (tags != null && tags.Any()) 784 { 785 <div class="newspage__tags__wrapper"> 786 <p class="newspage__tags__title">Tags</p> 787 <ul class="newspage__tags__list"> 788 @foreach (var tag in tags) 789 { 790 var item = ItemManager.Storage.GetById("NewsLabel", tag); 791 <li class="newspage__tags__list-item">@item["Label"]</li> 792 } 793 </ul> 794 </div> 795 } 796 797 </article> 798 799 </section> 800 <section class="newspage__aftercontent"> 801 @GetValue("DwContent(afterarticle)") 802 </section> 803 </div> 804 </div> 805 </main> 806 807 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 808 @using Dynamicweb; 809 @using Bluedesk.DynamicWeb.ItemTypes; 810 @using Bluedesk.Tools.DynamicWeb; 811 @{ 812 string footerLogo = GetString("Item.Area.Footer_Logo"); 813 string contactLink = GetString("Item.Area.ContactLink"); 814 string logoFooterAlt = GetString("Item.Area.Footer_Logo_Alt"); 815 816 //webite specific translations 817 string footerHeading1 = Translate(translatePrefix + "FooterNavigation.Header", "Categories"); 818 string footerHeading2 = Translate(translatePrefix + "FooterNavigation.Header2", "Categories"); 819 string followus = Translate(translatePrefix + "Footer.FollowUs", "Follow Us"); 820 string signup = Translate(translatePrefix + "Footer.SignUpNewsletter", "Sign up for the digital newsletter"); 821 string footerCopyright = Translate(translatePrefix + "Footer.Review.Score", "Copyright &copy; Koks. Alle Rechte vorbehalten."); 822 string footerInfo = Translate(translatePrefix + "Footer.Info", "Info"); 823 824 var loginPageId = PageHelper.GetPageIDByNavigationTag("SignIn", Pageview.AreaID); 825 826 var newFooterLogoALT = footerLogo.Split('/').Last().Replace(".jpg", "").Replace(".png", "").Replace("-", " ").Replace("_", " "); 827 } 828 829 830 <section class="footer"> 831 @{ 832 var newsletterFormID = ModuleOnlyParagraph.GetParagraphIDByTag("Footer.Newsletter", Pageview.AreaID); 833 834 if (newsletterFormID > 0) 835 { 836 <div class="footer__top"> 837 <div class="container"> 838 <fieldset class="footer__newsletter"> 839 <label class="footer__newsletter-label"> 840 @signup 841 <a tabindex="0" class="info" role="button" data-placement="top" data-toggle="popover" data-content='@footerInfo'>&nbsp;</a> 842 </label> 843 @RenderParagraphContent(newsletterFormID) 844 </fieldset> 845 </div> 846 </div> 847 } 848 } 849 <div class="footer__middle"> 850 <a href="javascript:;" class="scrolltop-btn footer__scrolltotop footer__scrolltotop--hide">@Translate("Footer.ScrollToTop", "To Top")</a> 851 852 <div class="footer__btns footer__scrolltotop footer__scrolltotop--hide hidden-lg hidden-md"> 853 @if (!hideLogin) 854 { 855 if (Pageview.User == null) 856 { 857 <a href="/Default.aspx?ID=@loginPageId" class="login"></a> 858 } 859 else 860 { 861 <a href="/Admin/Public/ExtranetLogoff.aspx?ID=@Pageview.Page.ID" class="logout"></a> 862 } 863 } 864 <a href="/@contactLink" class="email"></a> 865 <a href="tel:@phonenumber" class="phone"></a> 866 <a href="/Default.aspx?ID=@productsPage" class="productBtn">@Translate(translatePrefix + "Header.AskForOffer", "Ask for offer")</a> 867 <a href="javascript:;" class="header__hamburger"></a> 868 </div> 869 870 <div class="container"> 871 <section class="col-xs-12 col-sm-4 col-md-4"> 872 <ul class="footer__usp-list"> 873 <li class="footer__usp-list-item">@GetString("Item.Area.USP_1.Value")</li> 874 <li class="footer__usp-list-item">@GetString("Item.Area.USP_2.Value")</li> 875 <li class="footer__usp-list-item">@GetString("Item.Area.USP_3.Value")</li> 876 </ul> 877 </section> 878 <section class="col-xs-12 col-sm-4 col-md-2 footer__kategorie-col"> 879 <nav class="footer__kategorie-menu"> 880 <h4 class="footer__kategorie-menu-header">@footerHeading1</h4> 881 @GetValue("DwNavigation(footernavigation)") 882 </nav> 883 </section> 884 <section class="col-xs-12 col-sm-4 col-md-2 footer__kategorie-col"> 885 <nav class="footer__kategorie-menu"> 886 <h4 class="footer__kategorie-menu-header">@footerHeading2</h4> 887 @GetValue("DwNavigation(footernavigation2)") 888 </nav> 889 </section> 890 <section class="footer__company-info col-xs-12 col-sm-12 col-md-3 col-md-push-1"> 891 892 @*<img src="/admin/public/getimage.ashx?image=@(footerLogo)&width=250&compression=80&height=60" alt="@logoFooterAlt">*@ 893 894 <figure class="logo"> 895 <picture class="cta-paragraph__image bg-cover "> 896 <source media="(max-width: 480px)" srcset="/Admin/Public/GetImage.ashx?Image=@footerLogo&amp;Crop=0&amp;Width=350&amp;Compression=80"> 897 <source media="(max-width: 994px)" srcset="/Admin/Public/GetImage.ashx?Image=@footerLogo&amp;Crop=0&amp;Width=400&amp;Compression=80"> 898 <img src="/Admin/Public/GetImage.ashx?Image=@footerLogo&amp;Crop=0&amp;Width=500&amp;Compression=80" alt="@newFooterLogoALT" class="cta-paragraph__image bg-cover "> 899 </picture> 900 </figure> 901 902 903 <div class="footer__company-address"> 904 @GetString("Item.Area.FooterAddress") 905 906 @GetString("Item.Area.FooterSummary.Value") 907 </div> 908 909 <nav class="footer__social-menu col-xs-12 col-sm-12 col-md-12"> 910 911 <div class="footer__social-menu-container"> 912 <label class="footer__social-menu-label">@followus:</label> 913 914 @{ 915 var fb = GetString("Item.Area.Facebook"); 916 var twitter = GetString("Item.Area.Twitter"); 917 var linkedin = GetString("Item.Area.LinkedIn"); 918 var googlePlus = GetString("Item.Area.GooglePlus"); 919 var instagram = GetString("Item.Area.Instagram"); 920 var youtube = GetString("Item.Area.Youtube"); 921 922 if (!string.IsNullOrWhiteSpace(twitter)) 923 { 924 <a href="@twitter" target="_blank" title="twitter" class="footer__social-menu-link fa fa-twitter"></a> 925 } 926 if (!string.IsNullOrWhiteSpace(fb)) 927 { 928 <a href="@fb" target="_blank" title="facebook" class="footer__social-menu-link fa fa-facebook"></a> 929 } 930 if (!string.IsNullOrWhiteSpace(linkedin)) 931 { 932 <a href="@linkedin" target="_blank" title="LinkedIn" class="footer__social-menu-link fa fa-linkedin"></a> 933 } 934 if (!string.IsNullOrWhiteSpace(instagram)) 935 { 936 <a href="@instagram" target="_blank" title="Instagram" class="footer__social-menu-link fa fa-instagram"></a> 937 } 938 if (!string.IsNullOrWhiteSpace(googlePlus)) 939 { 940 <a href="@googlePlus" target="_blank" title="Google Plus" class="footer__social-menu-link fa fa-google-plus"></a> 941 } 942 if (!string.IsNullOrWhiteSpace(youtube)) 943 { 944 <a href="@youtube" target="_blank" title="YouTube" class="footer__social-menu-link fa fa-youtube"></a> 945 } 946 } 947 </div> 948 </nav> 949 </section> 950 </div> 951 </div> 952 <div class="footer__bottom container"> 953 <nav class="footer__bottom-menu col-xs-12 col-sm-7 col-md-7"> 954 @GetValue("DwNavigation(bottomnavigation)") 955 </nav> 956 <label class="footer__copyright col-xs-12 col-sm-5 col-md-5">@footerCopyright</label> 957 958 </div> 959 </section> 960 961 962 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 963 @using Dynamicweb; 964 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 965 @using Bluedesk.DynamicWeb.ItemTypes; 966 967 @{ 968 var BottomCTALink = GetString("Item.Area.Header_CTA.Link.Value"); 969 var BottomCTAText = GetValue("Item.Area.Header_CTA.Text.Value"); 970 var ContactLabel = GetString("Item.Area.SidemenuLabel"); 971 var Phone = GetString("Item.Area.Phone").Replace(" ", "").Replace("-", ""); 972 var ContactMeFormID = GetInteger("Item.Area.Contact_Form.Value"); 973 var CallMeFormID = GetInteger("Item.Area.CallMe_Form.Value"); 974 975 var button3link = GetString("Item.Area.Button_3Link"); 976 var button4link = GetString("Item.Area.Button_4Link"); 977 978 979 var section2Button1link = GetString("Item.Area.Section2Button_1Link"); 980 var section2Button2link = GetString("Item.Area.Section2Button_2Link"); 981 982 983 string workingDaysWeekdays = Translate("Sidemenu.Weekdays", "Mo-Fr"); 984 string workingDaysWeek = Translate("Sidemenu.Week", "Mo-Su"); 985 string workingHoursText = Translate("Sidemenu.WorkingHours", "Working hours"); 986 string workingDaysText = Translate("Sidemenu.WorkingDays", "Working days"); 987 string workingDays = GetString("Item.Area.Working_Days") == "7" ? workingDaysWeek : workingDaysWeekdays; 988 DateTime startH = GetDate("Item.Area.Start_Hour"); 989 string startHourTT = startH.ToString("tt"); 990 string startHour = !string.IsNullOrWhiteSpace(startHourTT) ? startH.ToString("hh:mm tt") : startH.ToString("HH:mm"); 991 992 DateTime endH = GetDate("Item.Area.End_Hour"); 993 string endHourTT = endH.ToString("tt"); 994 string endHour = !string.IsNullOrWhiteSpace(endHourTT) ? endH.ToString("hh:mm tt") : endH.ToString("HH:mm"); 995 string workingHours = startHour + "- " + endHour; 996 997 } 998 999 @*side-nav op desktop en tablet :*@ 1000 @if (!string.IsNullOrWhiteSpace(GetGlobalValue("Global:Device.IsDesktop")) || !string.IsNullOrWhiteSpace(GetGlobalValue("Global:Device.IsTablet"))) 1001 { 1002 <div class="bdbackdrop bdbackdrop__sidenav"></div> 1003 <nav class="side-nav"> 1004 <a class="side-nav__tag" id="side-nav__tag">@ContactLabel</a> 1005 1006 <div id="side-nav-overview" class="side-nav__body"> 1007 <div class="side-nav__items"> 1008 <a id="to-contact-form" class="btn btn-osr-white side-nav__btn btn-side_cnt" href="javascript:void(0);">@GetString("Item.Area.Button_1Text")</a> 1009 <a id="to-call-me-form" class="btn btn-osr-white side-nav__btn btn-side-cmb" href="javascript:void(0);">@GetString("Item.Area.Button_2Text")</a> 1010 1011 @foreach (var item in GetLoop("Item.Area.SidemenuButtonlist")) 1012 { 1013 string id = item.GetString("Item.Area.SidemenuButtonlist.Field.Id"); 1014 string href = item.GetString("Item.Area.SidemenuButtonlist.ButtonLink.Value"); 1015 string newWindow = item.GetBoolean("Item.Area.SidemenuButtonlist_2.NewWindow.Value") ? "_blank" : "_self"; 1016 1017 <a id="@id" target="@newWindow" class="btn btn-osr-white side-nav__btn btn-side_cnt" href="@href">@item.GetString("Item.Area.SidemenuButtonlist.ButtonText.Value")</a> 1018 } 1019 1020 </div> 1021 <div class="side-nav__items section2 bg--pattern"> 1022 1023 @foreach (var item in GetLoop("Item.Area.SidemenuButtonlist_2")) 1024 { 1025 string id = item.GetString("Item.Area.SidemenuButtonlist_2.Field.Id"); 1026 string href = item.GetString("Item.Area.SidemenuButtonlist_2.ButtonLink.Value"); 1027 string newWindow = item.GetBoolean("Item.Area.SidemenuButtonlist_2.NewWindow.Value") ? "_blank" : "_self"; 1028 1029 <a id="@id" target="@newWindow" class="btn btn-osr-white side-nav__btn btn-side_cnt" href="@href">@item.GetString("Item.Area.SidemenuButtonlist_2.ButtonText.Value")</a> 1030 } 1031 1032 </div> 1033 1034 <p class="side-nav__paragraph"> 1035 @workingDaysText: @workingDays<br> 1036 @workingHoursText: @workingHours 1037 </p> 1038 <p class="side-nav__paragraph"> 1039 @GetString("Item.Area.SidemenuText") 1040 </p> 1041 <div class="side-nav__callme-wrapper"> 1042 <a class="side-nav__callme" href="tel:@Phone">@GetString("Item.Area.Phone")</a> 1043 </div> 1044 1045 </div> 1046 <div id="side-nav-contact" class="side-nav__body side-nav__body--form side-nav__body--form-big"> 1047 <i class="side-nav__close"></i> 1048 <div class="side-nav__items"> 1049 @if(ContactMeFormID > 0) 1050 { 1051 @RenderParagraphContent(ContactMeFormID) 1052 } 1053 </div> 1054 </div> 1055 <div id="side-nav-call-me" class="side-nav__body side-nav__body--form"> 1056 <i class="side-nav__close"></i> 1057 <div class="side-nav__items"> 1058 @if(CallMeFormID > 0) 1059 { 1060 @RenderParagraphContent(CallMeFormID) 1061 } 1062 </div> 1063 </div> 1064 1065 </nav> 1066 <!-- End side-nav --> 1067 } 1068 1069 <!-- comment --> 1070 <script src="//maps.googleapis.com/maps/api/js?key=AIzaSyAjRew7Nm4Kwy3r9aXzPyZhqWsHu0uGOCo"></script> 1071 <script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/3.1.0/mustache.min.js"></script> 1072 <script type="text/javascript" src="/Files/Templates/Designs/KoksGroup/dist/js/polyfills.js"></script> 1073 <script type="text/javascript" src="/Files/Templates/Designs/KoksGroup/dist/js/main.js"></script> 1074 <script type="text/javascript" src="/Files/Templates/Designs/KoksGroup/dist/js/vue.js"></script> 1075 @* 1076 <script type="text/javascript" src="/Files/Templates/Designs/KoksGroup/dist/vuejs/vuedist.js"></script> *@ 1077 1078 @if (lang == "nl") 1079 { 1080 <script type="text/javascript" src="/Files/_bower_components/jquery-validate/src/localization/messages_nl.js"></script> 1081 } 1082 else if (lang == "de") 1083 { 1084 <script type="text/javascript" src="/Files/_bower_components/jquery-validate/src/localization/messages_de.js"></script> 1085 } 1086 1087 <!-- RenderModals --> 1088 @RenderSnippet("modal") 1089 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1090 @using Dynamicweb; 1091 @{ 1092 string addThisPubId = GetString("Item.Area.AddThis"); 1093 } 1094 @if (!string.IsNullOrEmpty(addThisPubId)) { 1095 <!-- Go to www.addthis.com/dashboard to customize your tools --> 1096 <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=@addThisPubId"> 1097 </script> 1098 } 1099 1100 1101 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1102 @using Dynamicweb; 1103 @using System.Linq; 1104 1105 @{ 1106 var ogdesc = GetString("Meta.Description"); 1107 var ogtitle = GetString("Title"); 1108 var og_item_image = GetString("Item.Image"); 1109 var og_page_image = GetString("Item.Page.Og_Image"); 1110 var ogimage = !string.IsNullOrWhiteSpace(og_page_image) ? string.Format("{0}{1}", httpdomain, og_page_image) : string.Format("{0}{1}", httpdomain, og_item_image); //httpdomain is declared in Master.cshtml 1111 } 1112 1113 @SnippetStart("ogTags") 1114 <meta property="og:title" content="@ogtitle"> 1115 <meta property="og:description" content="@ogdesc"> 1116 <meta property="og:type" content="website"> 1117 1118 @if (!string.IsNullOrWhiteSpace(og_item_image) || !string.IsNullOrWhiteSpace(og_page_image)) 1119 { 1120 <meta property="og:image" content="@ogimage"> 1121 } 1122 @SnippetEnd("ogTags") 1123 1124 1125 1126 1127 @helper renderRichSnippet() 1128 { 1129 <script type="application/ld+json"> 1130 [{ 1131 "@@context": "http://schema.org", 1132 "@@type": "Organization", 1133 "name" : "@GetString("DwAreaName")", 1134 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 1135 "sameAs" : "@GetString("Item.Area.Facebook")", 1136 "logo": @GetString("Item.Area.Logo"), 1137 "contactPoint" : [{ 1138 "@@type" : "ContactPoint", 1139 "telephone" : "@GetString("Item.Area.Phonenumber")", 1140 "contactType" : "customer service" , 1141 "@@context": "http://schema.org", 1142 "@@type": "ContactPoint", 1143 "@@id": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 1144 "name": "@GetString("DwAreaName")", 1145 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()" 1146 }], 1147 "address": { 1148 "@@type": "PostalAddress", 1149 "streetAddress": "@GetString("Item.Area.StreetAddress")", 1150 "addressLocality": "@GetString("Item.Area.AddressLocality")", 1151 "addressRegion": "@GetString("Item.Area.AddressRegion")", 1152 "postalCode": " @GetString("Item.Area.PostalCode")", 1153 "addressCountry": "@GetString("Item.Area.AddressCountry")" 1154 } 1155 }, 1156 { 1157 "@@context": "http://schema.org", 1158 "@@type": "WebSite", 1159 "name" : "@GetString("DwAreaName")", 1160 "alternateName" : "Koks Group", 1161 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 1162 "potentialAction": { 1163 "@@type": "SearchAction", 1164 "target": " /default.aspx?id=@GetString("Item.Area.SearchPage")&q={search_term_string}", 1165 "query-input": "required name=search_term_string" 1166 } 1167 }] 1168 </script> 1169 } 1170 1171 1172 1173 @helper renderRichSnippetKoks() 1174 { 1175 string logo = GetString("Item.Area.Logo"); 1176 1177 <script type="application/ld+json"> 1178 [{ 1179 "@@context": "http://schema.org", 1180 "@@type": "Organization", 1181 "name" : "@GetString("DwAreaName")", 1182 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 1183 "logo": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()/@logo", 1184 "contactPoint" : [{ 1185 "@@type" : "ContactPoint", 1186 "telephone" : "@GetString("Item.Area.Phonenumber")", 1187 "contactType" : "customer service" , 1188 "@@context": "http://schema.org", 1189 "@@id": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 1190 "name": "@GetString("DwAreaName")" 1191 }], 1192 "address": { 1193 "@@type": "PostalAddress", 1194 "streetAddress": "@GetString("Item.Area.StreetAddress")", 1195 "addressLocality": "@GetString("Item.Area.AddressLocality")", 1196 "addressRegion": "@GetString("Item.Area.AddressRegion")", 1197 "postalCode": " @GetString("Item.Area.PostalCode")", 1198 "addressCountry": "@GetString("Item.Area.AddressCountry")" 1199 } 1200 }, 1201 { 1202 "@@context": "http://schema.org", 1203 "@@type": "WebSite", 1204 "name" : "@GetString("DwAreaName")", 1205 "alternateName" : "@GetString("DwAreaName")", 1206 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 1207 "potentialAction": { 1208 "@@type": "SearchAction", 1209 "target": " /default.aspx?id=@GetString("Item.Area.SearchPageSEO")&q={search_term_string}", 1210 "query-input": "required name=search_term_string" 1211 } 1212 }] 1213 </script> 1214 } 1215 1216 1217 <!-- Structured Data JSON-LD --> 1218 @helper renderReviewSnippetKoks() 1219 { 1220 var reviewName = GetString("Item.Area.Review_Name") != null ? GetString("Item.Area.Review_Name") : ""; 1221 var reviewBestRating = GetString("Item.Area.Review_Best_Rating") != null ? GetString("Item.Area.Review_Best_Rating") : ""; 1222 var reviewWorstRating = GetString("Item.Area.Review_Worst_Rating") != null ? GetString("Item.Area.Review_Worst_Rating") : ""; 1223 var reviewRatingValue = GetString("Item.Area.Review_Rating_Value") != null ? GetString("Item.Area.Review_Rating_Value") : ""; 1224 var reviewCount = GetString("Item.Area.Review_Count") != null ? GetString("Item.Area.Review_Count") : ""; 1225 var reviewUrl = GetString("Item.Area.Review_URL") != null ? GetString("Item.Area.Review_URL") : ""; 1226 1227 1228 <script type="application/ld+json"> 1229 { 1230 "@@context": "http://schema.org", 1231 "@@type": "Product", 1232 "name": "@reviewName", 1233 "url":"@reviewUrl", 1234 "aggregateRating": { 1235 "@@type": "AggregateRating", 1236 "bestRating": "@reviewBestRating", 1237 "worstRating": "@reviewWorstRating", 1238 "ratingValue": "@reviewRatingValue", 1239 "reviewCount": "@reviewCount" 1240 } 1241 } 1242 </script> 1243 } 1244 1245 1246 1247 1248 1249 </body> 1250 </html> 1251