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