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