Error executing template "Designs/Alkmaar Marketing/_parsed/Event.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_8322593b3e204c1fa22b18d23e5e2cbe.<>c__DisplayClass3_0.b__5(Page p) in D:\virtual_hosts\alkmaarprachtstad.nl\files\Templates\Designs\Alkmaar Marketing\_parsed\Event.parsed.cshtml:line 513
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at CompiledRazorTemplates.Dynamic.RazorEngine_8322593b3e204c1fa22b18d23e5e2cbe.Execute() in D:\virtual_hosts\alkmaarprachtstad.nl\files\Templates\Designs\Alkmaar Marketing\_parsed\Event.parsed.cshtml:line 513
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineCore.RunTemplate(ICompiledTemplate template, TextWriter writer, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.DynamicWrapperService.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 RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, String name, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.RunCompile(IRazorEngineService service, ITemplateSource templateSource, String name, Type modelType, Object model, DynamicViewBag viewBag)
   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 4 <!DOCTYPE html> 5 @{ 6 var httpdomain = Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain(); 7 var ogurl = string.Format("{0}{1}", httpdomain, GetGlobalValue("Global:Pageview.Url")); 8 var cultShort = GetString("Lang"); 9 } 10 <html lang="@cultShort"> 11 <head prefix="og: http://ogp.me/ns#"> 12 <meta charset="utf-8"> 13 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 14 @*<meta name="viewport" content="width=device-width, initial-scale=1">*@ 15 <meta name="viewport" content="width=device-width, initial-scale=1.0001, minimum-scale=1.0001, maximum-scale=1.0001"> 16 <meta name="theme-color" content="#fff"> 17 18 <meta property="og:site_name" content="Alkmaar Marketing"> 19 <meta property="og:url" content="@ogurl"> 20 21 @RenderSnippet("ogTags") 22 23 <title>@GetValue("Title")</title> 24 @GetValue("MetaTags") 25 @GetValue("CopyRightNotice") 26 27 <link href="//fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"> 28 <link href="/Files/Templates/Designs/Alkmaar%20Marketing/dist/css/style.min.css?v=1.0.2" rel="stylesheet"> 29 <link rel="icon" href="/Files/Templates/Designs/Alkmaar%20Marketing/img/favicon.png" type="image/x-icon"> 30 31 32 @* <link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css"> *@ 33 34 @GetString("Item.Area.Custom_Html_Head") 35 36 @renderRichSnippet() 37 @renderReviewSnippet() 38 39 @GetValue("Stylesheets") 40 @GetValue("Javascripts") 41 </head> 42 43 <body> 44 @GetString("Item.Area.Google_Tag_Manager") 45 46 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 47 @using Dynamicweb; 48 @using Dynamicweb.Content; 49 @using System.Globalization; 50 @using System.Text.RegularExpressions; 51 <!-- Begin header --> 52 53 @{ 54 var introheader = GetString("Item.Page.Intro_Title"); 55 var introcontent = GetString("Item.Page.Intro_Content"); 56 var introbuttontext = GetString("Item.Page.Intro_Button_Text"); 57 var introbuttonlink = GetString("Item.Page.Intro_Button_Url"); 58 var introimg = GetString("Item.Page.Intro_Image"); 59 var vidUrl = GetString("Item.Page.Video_Url"); 60 var introimgMobile = GetString("Item.Page.Image_Mobile"); 61 var imgtag = !string.IsNullOrWhiteSpace(introimg) ? string.Format("background-image: url('{0}');", introimg) : ""; 62 var ishome = GetInteger("DwAreaFirstPageID") == GetInteger("Global.PageId"); 63 var homeheader = ishome ? "header--homepage" : ""; 64 65 var obj_pageViewCurrent = Dynamicweb.Frontend.PageView.Current(); 66 string areaID = obj_pageViewCurrent.AreaID.ToString(); 67 string countryCode = GetGlobalValue("Global:Area.Culture.CountryCode"); 68 69 CultureInfo cultureCurrent = CultureInfo.GetCultureInfo(Pageview.Area.Culture); 70 71 string currentCultureFlag = string.Format("/Admin/Images/Flags/flag_{0}.png", Pageview.Area.Culture.Substring(3, 2).ToLower()); 72 73 var staticLinks = GetLoop("Item.Area.StaticLinks"); 74 var languages = GetLoop("Languages").Where(x => !x.GetBoolean("IsCurrent")); 75 var listType = GetString("Item.Area.ListType"); 76 77 string defaultLogo = "/Files/Templates/Designs/Alkmaar Marketing/img/header__logo.png"; 78 string websiteLogo = !string.IsNullOrEmpty(GetString("Item.Area.Logo")) ? GetString("Item.Area.Logo") : defaultLogo; 79 var checkPageforPurpleWave = GetGlobalValue("Global:Page.ID") == "24375" ? "header--homepage" : ""; 80 81 string YoutubeId = null; 82 83 if (!string.IsNullOrWhiteSpace(GetString("Item.Page.Video_Url"))) 84 { 85 // regex for https://youtu.be/{videoid} 86 Regex regex = new Regex(@".be\/(.[^?]*)"); 87 Match match = regex.Match(GetString("Item.Page.Video_Url")); 88 if (match.Success) 89 { 90 YoutubeId = match.Groups[1].Value; 91 } 92 93 // regex for https://www.youtube.com/watch?v={videoid} 94 regex = new Regex(@"v=([^&]+)"); 95 match = regex.Match(this.GetString("Item.Page.Video_Url")); 96 if (match.Success) 97 { 98 YoutubeId = match.Groups[1].Value; 99 } 100 } 101 } 102 103 <header class="header @homeheader @checkPageforPurpleWave" style="@imgtag" data-mobileimg="@introimgMobile" data-introimg="@introimg"> 104 @if (!string.IsNullOrWhiteSpace(vidUrl) && string.IsNullOrWhiteSpace(introimg)) 105 { 106 <div class="video-background"> 107 <div class="video-background__container video-background__container--youtube"> 108 <iframe class="youtube-video" width="1800" height="500" src="https://www.youtube.com/embed/@YoutubeId?autoplay=1&mute=1&controls=0&loop=1&;playlist=@YoutubeId" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture"></iframe> 109 </div> 110 </div> 111 } 112 <section class="intro"> 113 <div class="intro__content"> 114 @if (!string.IsNullOrWhiteSpace(introheader)) 115 { 116 <h1 class="intro__header">@introheader</h1>} 117 @if (!string.IsNullOrWhiteSpace(introcontent)) 118 { 119 <p>@introcontent</p>} 120 @if (!string.IsNullOrWhiteSpace(introbuttontext) && !string.IsNullOrWhiteSpace(introbuttonlink)) 121 { 122 <a href="@introbuttonlink" class="intro__cta">@introbuttontext</a>} 123 </div> 124 </section> 125 126 <section class="header__container header__container--sticky"> 127 <a href="/" class="header__logo"> 128 <figure class="header__logo-img"></figure> 129 </a> 130 131 <nav class="mainmenu"> 132 133 <div class="mainmenu__items"> 134 @if (ishome) 135 { 136 <ul class="mainmenu__list mainmenu__list--homemenu hidden-md-up"> 137 @GetValue("DwNavigation(homemenu)") 138 </ul> 139 } 140 <ul class="mainmenu__list"> 141 @GetValue("DwNavigation(mainmenu)") 142 </ul> 143 </div> 144 @{ 145 var searchpage = GetString("Item.Area.SearchPageID"); 146 var searchplaceholder = Translate("Search.PlaceholderText", "Waar bent u naar op zoek?"); 147 <section class="searchbox"> 148 <form class="searchbox__form" method="get" action="/Default.aspx"> 149 <input type="hidden" name="ID" value="@searchpage"> 150 <input type="text" name="q" value="" placeholder="@searchplaceholder" class="searchbox__input"> 151 <i class="searchbox__close hidden-md-up"></i> 152 </form> 153 <a href="#" class="mainmenu__searchtoggle"></a> 154 </section> 155 } 156 157 <div class="mainmenu__social"> 158 @{ 159 var fbLink = GetString("Item.Area.Facebook"); 160 var twitterLink = GetString("Item.Area.Twitter"); 161 var instagramLink = GetString("Item.Area.Instagram"); 162 163 if (!string.IsNullOrWhiteSpace(fbLink)) 164 { 165 <a href="@fbLink" target="_blank" title="Facebook" class="mainmenu__sociallink mainmenu__sociallink--fb"> 166 <img src="/Files/Templates/Designs/Alkmaar%20Marketing/img/socialmedia__icon--facebook.png"> 167 </a> 168 } 169 if (!string.IsNullOrWhiteSpace(twitterLink)) 170 { 171 <a href="@twitterLink" target="_blank" title="Twitter" class="mainmenu__sociallink mainmenu__sociallink--twitter"> 172 <img src="/Files/Templates/Designs/Alkmaar%20Marketing/img/socialmedia__icon--twitter.png"> 173 </a> 174 } 175 if (!string.IsNullOrWhiteSpace(instagramLink)) 176 { 177 <a href="@instagramLink" target="_blank" title="Instagram" class="mainmenu__sociallink mainmenu__sociallink--ig"> 178 <img src="/Files/Templates/Designs/Alkmaar%20Marketing/img/socialmedia__icon--instagram.png"> 179 </a> 180 } 181 } 182 </div> 183 </nav> 184 185 <ul class="mainmenu__buttons" data-test='@GetValue("Area.ID") @GetValue("DwAreaFirstPageID")'> 186 <!-- <li class="mainmenu__buttons-button"><a href="#" class="mainmenu__searchtoggle"></a></li> --> 187 <li class="mainmenu__buttons-button"> 188 <a href="#" id="language" class="mainmenu__languageswitch" style="background-image: url('@currentCultureFlag');"></a> 189 <ul id="languageDropdown" class="mainmenu__languageswitch--dropdown" role="menu" aria-labelledby="languageselect"> 190 @if ((listType == "all" || listType == "language") && languages.Any()) 191 { 192 foreach (var language in languages) 193 { 194 195 var homepage = language.GetInteger("FirstActivePageID"); 196 var name = language.GetString("Name"); 197 string languageCode = language.GetString("Culture").Substring(3, 2).ToLower(); 198 int firstPageID = language.GetInteger("FirstActivePageID"); 199 //int pageId = language.GetInteger("DwPageID"); 200 int pageId = language.GetInteger("PageID"); 201 int areaId = language.GetInteger("ID"); 202 string isCurrent = language.GetBoolean("IsCurrent") ? " selected " : ""; 203 bool isMaster = language.GetBoolean("IsMaster"); 204 205 //Page linkPage = Page.GetPageBySql("Select * from Page where PageAreaID = '" + areaID + "' and PageMasterPageID = '" + pageId + "'"); 206 string pageVersionID = pageId > 0 ? pageId.ToString() : firstPageID.ToString(); //isMaster && linkPage != null ? linkPage.ID.ToString() : masterPage.ToString(); 207 208 string pageUrl = "/Default.aspx?ID=" + pageVersionID; 209 var cultureFlag = string.Format("/Admin/Images/Flags/flag_{0}.png", languageCode); 210 211 212 213 214 //int localizedPageID = "1"; //pageId > 0 ? pageService.GetPageIDByMasterID(pageId, areaId) : homepage; 215 //pageId = localizedPageID == 0 ? pageId : localizedPageID; 216 //string pageUrl = "";// Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(pageId); 217 218 <li role="presentation" data-current="@isCurrent"> 219 <a role="menuitem" tabindex="-1" href='@pageUrl' title="@name" style="background-image: url(@cultureFlag);" class="mainmenu__languageswitch"></a> 220 </li> 221 222 } 223 } 224 @if ((listType == "all" || listType == "static") && staticLinks.Any()) 225 { 226 foreach (var staticLink in staticLinks) 227 { 228 var txt = staticLink.GetString("Item.Area.StaticLinks.Title"); 229 var link = staticLink.GetString("Item.Area.StaticLinks.Link"); 230 var icon = staticLink.GetString("Item.Area.StaticLinks.Icon"); 231 var flag = string.Format("/Admin/Images/Flags/flag_{0}.png", icon); 232 233 if (!string.IsNullOrWhiteSpace(txt) && !string.IsNullOrWhiteSpace(link)) 234 { 235 <li role="presentation"> 236 <a role="menuitem" tabindex="-1" href="@link" title="@txt" style="background-image: url(@flag);" target="_blank" class="mainmenu__languageswitch"></a> 237 </li> 238 } 239 } 240 } 241 242 </ul> 243 </li> 244 <li class="mainmenu__buttons-button"> 245 <a href="#" class="mainmenu__toggle"> 246 <div class="mainmenu__toggle__btn"></div> 247 <div class="mainmenu__placeholder"></div> 248 </a> 249 </li> 250 </ul> 251 <a href="https://www.alkmaarprachtstad.nl/vvv-alkmaar" target="_blank" class="header__vvv-logo"> 252 <img src="/Files/Images/vvv_los.png"> 253 </a> 254 </section> 255 </header> 256 <!-- End header --> 257 258 @if (GetInteger("DwAreaFirstPageID") == GetInteger("Global.PageId") && !(string.IsNullOrWhiteSpace(GetString("Item.Area.ShoutboxSubtitle.Value")) && string.IsNullOrWhiteSpace(GetString("Item.Area.ShoutboxTitle.Value")))) 259 { 260 var link = GetString("Item.Area.ShoutLink.Value"); 261 <div class="shoutbox"> 262 <a href="@link" class="shoutbox__link"> 263 <span class="shoutbox__date">@GetString("Item.Area.ShoutboxSubtitle.Value")</span> 264 <span class="shoutbox__title">@GetString("Item.Area.ShoutboxTitle.Value")</span> 265 </a> 266 </div> 267 } 268 269 @if (GetBoolean("Item.Page.ShowShoutbox")) 270 { 271 var link = GetString("Item.Page.ShoutboxLink"); 272 var text = GetString("Item.Page.ShoutboxText"); 273 bool isExternal = link.StartsWith("http"); 274 bool hasDefault = link.StartsWith("Default.aspx"); 275 var url = isExternal || hasDefault ? @link : "/Default.aspx?Id=" + @link; 276 var target = isExternal ? "_blank" : "_self"; 277 278 <div class="shoutbox shoutbox--custom"> 279 <a href="@url" class="shoutbox__link" target="@target"> 280 <span class="shoutbox__title">@text</span> 281 </a> 282 </div> 283 284 @SnippetStart("ShoutboxButton") 285 <div> 286 <a href="/Default.aspx?Id=@link" class="filters__input filters__input--diap">@text</a> 287 </div> 288 @SnippetEnd("ShoutboxButton") 289 } 290 291 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 292 @using Dynamicweb; 293 @using System.Linq; 294 @using Bluedesk.DynamicWeb.ExtensionMethods; 295 @using Bluedesk.DynamicWeb.ItemTypes.Events; 296 297 298 299 @SnippetStart("AddThis") 300 <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-58b57d1ac939fad1"></script> 301 @SnippetEnd("AddThis") 302 303 @{ 304 // What are we showing ? 305 var currentItemType = Pageview.Item.SystemName; 306 307 // check if we are showing the main event 308 var isMainEvent = !Pageview.Page.Parent.Item.SystemName.Equals(currentItemType); 309 310 var _data = Event.CreateFrom(Pageview.Item.SerializeTo()); 311 var variant_data = new Event(); 312 313 if (!isMainEvent) 314 { 315 // Event variant is displayed, we should start with loading the parent item for the default values. SerializeTo() with no parameters is an extension from the Bluedesk.DynamicWeb library 316 _data.DeserializeFrom(Pageview.Page.Parent.Item.SerializeTo()); 317 variant_data.DeserializeFrom(Pageview.Item.SerializeTo()); 318 319 // merge related event data into the main event data. All available data from the related office will override de data of the main office. 320 // Take special care of the Name fields, they should both be filled. Title for the url and OfficeName for the header. 321 _data.Merge(variant_data); 322 } 323 } 324 325 @{ 326 bool multipleDays = (_data.End.DayOfYear > _data.Start.DayOfYear) || (_data.End.Year > _data.Start.Year) || (_data.Start != null && _data.End == null); 327 328 var category = new Dynamicweb.Content.Page(); 329 if (isMainEvent) 330 { 331 category = Pageview.Page.Parent.Item.SystemName.Equals("EventCategory") ? Pageview.Page.Parent : null; 332 } 333 else 334 { 335 category = Pageview.Page.Parent.Parent.Item.SystemName.Equals("EventCategory") ? Pageview.Page.Parent.Parent : null; 336 } 337 } 338 339 340 <section class="container-fluid"> 341 <div class="row no-gutter detailpage"> 342 <section class="col-xs-12 col-md-6 col-lg-5 col-lg-offset-1"> 343 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 344 @using Dynamicweb; 345 346 @{ 347 var title = _data.Header; //GetString("Item.Header"); 348 var date = GetDate("Item.PublishDate").ToString("dd-MM-yyyy"); ; //GetString("Item.PublishDate"); 349 var subtitle = _data.Subheader; // GetString("Item.Subheader"); 350 var content = _data.Content; //GetString("Item.Content"); 351 var btntext = _data.ButtonText;// GetString("Item.ButtonText"); 352 var btnurl = _data.ButtonLink;// GetString("Item.ButtonLink"); 353 var sale = GetString("Item.Actie"); 354 } 355 356 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 357 @using Dynamicweb; 358 359 @if (!GetBoolean("Item.Page.HideBreadcrumbs")) 360 { 361 <nav class="breadcrumbnav"> 362 @GetValue("DwNavigation(breadcrumblist)") 363 </nav> 364 } 365 366 <section class="detail"> 367 @{ 368 if (!string.IsNullOrWhiteSpace(title)) 369 { 370 <h1 class="detail__header">@title</h1> 371 } 372 if (!string.IsNullOrWhiteSpace(subtitle)) 373 { 374 <h2 class="detail__subheader">@subtitle</h2> 375 } 376 if (!string.IsNullOrWhiteSpace(date) && date != "01-01-0001") 377 { 378 <p class="detail__publish-date">@Translate("PublishedOn.News.Date", "Gepubliceerd op"): @date</p> 379 } 380 if (!string.IsNullOrWhiteSpace(content)) 381 { 382 <article class="detail__content"> 383 @content 384 </article> 385 } 386 if (!string.IsNullOrWhiteSpace(sale)) 387 { 388 <strong class="detail__sale">@sale</strong> 389 } 390 if (!string.IsNullOrWhiteSpace(btntext) && !string.IsNullOrWhiteSpace(btnurl)) 391 { 392 <footer class="detail__footer"> 393 <a href="@btnurl" class="detail__cta">@btntext</a> 394 </footer> 395 } 396 } 397 </section> 398 </section> 399 <aside class="meta col-xs-12 col-md-5 col-md-offset-1"> 400 <div class="row meta__content"> 401 <strong class="meta__header">Evenement Informatie:</strong> 402 <table> 403 @if (multipleDays) 404 { 405 <tr> 406 <td> 407 Van: 408 </td> 409 <td> 410 @_data.Start.ToString("dd MMM yyyy") 411 </td> 412 </tr> 413 <tr> 414 <td> 415 Tot: 416 </td> 417 <td> 418 @_data.End.ToString("dd MMM yyyy") 419 </td> 420 </tr> 421 } 422 else 423 { 424 <tr> 425 <td> 426 <i class="far fa-calendar"></i>Datum: 427 </td> 428 <td> 429 @_data.Start.ToString("dd MMM yyyy") 430 </td> 431 </tr> 432 } 433 @if (!multipleDays) 434 { 435 <tr> 436 <td> 437 <i class="far fa-clock"></i>Tijd: 438 </td> 439 <td>@_data.Start.ToString("HH:mm") - @_data.End.ToString("HH:mm")</td> 440 </tr> 441 } 442 @if (!string.IsNullOrWhiteSpace(_data.Location)) 443 { 444 <tr> 445 <td> 446 <i class="far fa-map-marker"></i>Locatie: 447 </td> 448 <td>@_data.Location</td> 449 </tr> 450 } 451 @if (category != null && !string.IsNullOrWhiteSpace(category.Item["Name"].ToString())) 452 { 453 <tr> 454 <td> 455 <i class="far fa-list-alt"></i>Categorie: 456 </td> 457 <td> 458 <a href="/Default.aspx?ID=@category.ID"> 459 @category.Item["Name"].ToString() 460 </a> 461 </td> 462 </tr> 463 } 464 @if (!string.IsNullOrWhiteSpace(_data.ContactUrl)) 465 { 466 var clearurl = _data.ContactUrl.Contains("http") ? _data.ContactUrl : "http://" + _data.ContactUrl; 467 <tr> 468 <td> 469 <i class="far fa-globe"></i>Website: 470 </td> 471 <td><a href="@clearurl" target="_blank">@_data.ContactUrl.Replace("http://", "").Replace("https://", "")</a></td> 472 </tr> 473 } 474 @if (!string.IsNullOrWhiteSpace(_data.TicketText)) 475 { 476 var urlTicket = _data.TicketLink; 477 <tr> 478 <td> 479 <i class="far fa-ticket"></i>Tickets: 480 </td> 481 <td> 482 @if (_data.TicketLink != "") 483 { 484 <a href="@urlTicket" target="_blank">@_data.TicketText</a> 485 } 486 else 487 { 488 <span>@_data.TicketText</span> 489 } 490 </td> 491 </tr> 492 } 493 </table> 494 495 </div> 496 <figure class="meta__image" style="background-image: url('@_data.Image');"></figure> 497 </aside> 498 </div> 499 500 @if (category != null) 501 { 502 <nav class="detailnav"> 503 @{ 504 var siblings = Services.Pages.GetPagesByParentID(category.ID).Where(p => p.Active).ToList(); 505 506 var indx = siblings.FirstOrDefault(c => c.ID.Equals(Pageview.Page.ID)); 507 508 if (indx == null) 509 { 510 indx = siblings.FirstOrDefault(c => c.ID.Equals(Pageview.Page.Parent.ID)); 511 } 512 513 var prevpage = siblings.OrderByDescending(p => p.Sort).FirstOrDefault(p => p.Sort < indx.Sort); 514 var nextpage = siblings.OrderBy(p => p.Sort).FirstOrDefault(p => p.Sort > indx.Sort); 515 516 if (prevpage != null) 517 { 518 <a href="/Default.aspx?ID=@prevpage.ID" class="detailnav__back"></a> 519 } 520 521 <a href="/Default.aspx?ID=@category.ID" class="detailnav__overview">Naar overzicht</a> 522 523 if (nextpage != null) 524 { 525 <a href="/Default.aspx?ID=@nextpage.ID" class="detailnav__next"></a> 526 } 527 } 528 </nav> 529 } 530 </section> 531 532 @GetValue("DwContent(content)") 533 534 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 535 @using Dynamicweb; 536 537 @{ 538 var newsletterid = GetInteger("Item.Area.NewsletterSubscribeParagraph"); 539 if (newsletterid > 0) 540 { 541 @RenderParagraphContent(newsletterid) 542 } 543 } 544 545 <footer class="footer"> 546 547 <section class="footer__middle container"> 548 <div class="row"> 549 <div class="col-md-6"> 550 @{ 551 var footertitle = GetString("Item.Area.FooterContent_Title"); 552 var footerimg = GetString("Item.Area.FooterContent_Image"); 553 var footertext = GetString("Item.Area.FooterContent_Text"); 554 } 555 <h4 class="footer__subtitle">@footertitle</h4> 556 <div class="row"> 557 <div class="col-md-4"> 558 <img src="@footerimg" class="footer__img"> 559 </div> 560 <div class="col-md-5">@footertext</div> 561 </div> 562 </div> 563 564 <div class="col-md-6"> 565 <nav class="footer-nav row"> 566 @GetValue("DwNavigation(footernavigation)") 567 </nav> 568 </div> 569 </div> 570 571 572 </section> 573 <section class="footer__bottom container"> 574 <div class="row"> 575 <div class="footer__social col-xs-12 col-sm-6 col-lg-2"> 576 @{ 577 var fb = GetString("Item.Area.Facebook"); 578 var twitter = GetString("Item.Area.Twitter"); 579 var instagram = GetString("Item.Area.Instagram"); 580 581 if (!string.IsNullOrWhiteSpace(fb)) 582 { 583 <a href="@fb" target="_blank" title="Facebook" class="footer__sociallink footer__sociallink--fb"> 584 <img src="/Files/Templates/Designs/Alkmaar%20Marketing/img/socialmedia__icon--facebook.png"> 585 </a> 586 } 587 if (!string.IsNullOrWhiteSpace(twitter)) 588 { 589 <a href="@twitter" target="_blank" title="Twitter" class="footer__sociallink footer__sociallink--twitter"> 590 <img src="/Files/Templates/Designs/Alkmaar%20Marketing/img/socialmedia__icon--twitter.png"> 591 </a> 592 } 593 if (!string.IsNullOrWhiteSpace(instagram)) 594 { 595 <a href="@instagram" target="_blank" title="Instagram" class="footer__sociallink footer__sociallink--ig"> 596 <img src="/Files/Templates/Designs/Alkmaar%20Marketing/img/socialmedia__icon--instagram.png"> 597 </a> 598 } 599 } 600 </div> 601 602 <div class="wifi col-xs-12 col-sm-6 col-lg-5"> 603 <img src="/Files/Templates/Designs/Alkmaar%20Marketing/img/icon__wifi.png" class="wifi__img"> 604 <span class="wifi__content">@GetString("Item.Area.WIFI")</span> 605 </div> 606 607 <nav class="legal col-xs-12 col-lg-5"> 608 @GetValue("DwNavigation(bottomnavigation)") 609 </nav> 610 </div> 611 </section> 612 </footer> 613 614 @RenderSnippet("AddThis") 615 616 617 618 @*<script src="//maps.googleapis.com/maps/api/js"></script>*@ 619 <script type="text/javascript" src="/Files/Templates/Designs/Alkmaar%20Marketing/dist/js/main.min.js?v=1.0.1"></script> 620 621 </body> 622 </html> 623 @helper renderRichSnippet() 624 { 625 <script type="application/ld+json"> 626 [{ 627 "@@context": "http://schema.org", 628 "@@type": "Organization", 629 "name" : "@GetString("DwAreaName")", 630 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 631 "sameAs" : "@GetString("Item.Area.Facebook")", 632 "logo": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()/Files/Templates/Designs/Alkmaar Marketing/img/header__logo.png", 633 "contactPoint" : [{ 634 "@@type" : "ContactPoint", 635 "telephone" : "@GetString("Item.Area.Phonenumber")", 636 "contactType" : "customer service" , 637 "@@context": "http://schema.org", 638 "@@id": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 639 "name": "@GetString("DwAreaName")", 640 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()" 641 }], 642 "address": { 643 "@@type": "PostalAddress", 644 "streetAddress": "@GetString("Item.Area.StreetAddress")", 645 "addressLocality": "@GetString("Item.Area.AddressLocality")", 646 "addressRegion": "@GetString("Item.Area.AddressRegion")", 647 "postalCode": " @GetString("Item.Area.PostalCode")", 648 "addressCountry": "@GetString("Item.Area.AddressCountry")" 649 } 650 }, 651 { 652 "@@context": "http://schema.org", 653 "@@type": "WebSite", 654 "name" : "@GetString("DwAreaName")", 655 "alternateName" : "Alkmaar Marketing", 656 "url": "@Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()", 657 "potentialAction": { 658 "@@type": "SearchAction", 659 "target": " @Dynamicweb.Environment.Helpers.LinkHelper.GetHttpDomain()/default.aspx?id=@GetString("Item.Area.SearchPage")&q={search_term_string}", 660 "query-input": "required name=search_term_string" 661 } 662 }] 663 </script> 664 } 665 666 667 <!-- Structured Data JSON-LD --> 668 @helper renderReviewSnippet() 669 { 670 var reviewName = GetString("Item.Area.Review_Name") != null ? GetString("Item.Area.Review_Name") : ""; 671 var reviewBestRating = GetString("Item.Area.Review_Best_Rating") != null ? GetString("Item.Area.Review_Best_Rating") : ""; 672 var reviewWorstRating = GetString("Item.Area.Review_Worst_Rating") != null ? GetString("Item.Area.Review_Worst_Rating") : ""; 673 var reviewRatingValue = GetString("Item.Area.Review_Rating_Value") != null ? GetString("Item.Area.Review_Rating_Value") : ""; 674 var reviewCount = GetString("Item.Area.Review_Count") != null ? GetString("Item.Area.Review_Count") : ""; 675 var reviewUrl = GetString("Item.Area.Review_URL") != null ? GetString("Item.Area.Review_URL") : ""; 676 677 678 <script type="application/ld+json"> 679 { 680 "@@context": "http://schema.org", 681 "@@type": "Product", 682 "name": "@reviewName", 683 "url":"@reviewUrl", 684 "aggregateRating": { 685 "@@type": "AggregateRating", 686 "bestRating": "@reviewBestRating", 687 "worstRating": "@reviewWorstRating", 688 "ratingValue": "@reviewRatingValue", 689 "reviewCount": "@reviewCount" 690 } 691 } 692 </script> 693 }