Error executing template "Designs/TwenteBranding/_parsed/JobOfferArticle.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
at Dynamicweb.Content.ItemService.GetItemByPageId(Int32 pageId, Boolean draft, DateTime previewDate)
at CompiledRazorTemplates.Dynamic.RazorEngine_39bba028d80a4fd099729a185b8b35f8.Execute() in D:\inetpub\wwwroot\www.twente.com\Files\Templates\Designs\TwenteBranding\_parsed\JobOfferArticle.parsed.cshtml:line 300
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.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 2 @using TwenteBranding.Repository.Helpers 3 4 @{ 5 Title("Master view model template"); 6 Description("Master view model template"); 7 var currentPageView = Dynamicweb.Frontend.PageView.Current(); 8 var contentLanguage = currentPageView.GlobalTags.GetTagByName("Global:Area.Lang").Value; 9 var scheme = currentPageView.GlobalTags.GetTagByName("Global:Request.Scheme").Value; 10 var host = currentPageView.GlobalTags.GetTagByName("Global:Request.Host").Value; 11 var requestHost = string.Format("{0}://{1}", scheme, host); 12 var metaDescription = Model.Description; 13 var metaKeywords = Model.Keywords; 14 15 var appJs = FileHelper.GetFilenameWithTimeStamp( "/Files/Templates/Designs/TwenteBranding/js/app.min.js"); 16 var appCss = FileHelper.GetFilenameWithTimeStamp( "/Files/Templates/Designs/TwenteBranding/css/main.min.css"); 17 18 <!DOCTYPE html> 19 <html lang="@contentLanguage"> 20 <head> 21 <title>@Model.Title</title> 22 @if (!string.IsNullOrWhiteSpace(metaDescription)) 23 { 24 <meta name="description" content="@metaDescription" /> 25 } 26 @if (!string.IsNullOrWhiteSpace(metaKeywords)) 27 { 28 <meta name="keywords" content="@metaKeywords" /> 29 } 30 <meta http-equiv="content-language" content='@contentLanguage' /> 31 <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 32 <meta http-equiv="imagetoolbar" content="no" /> 33 <meta http-equiv="x-dns-prefetch-control" content="on" /> 34 <meta http-equiv="x-ua-compatible" content="ie=edge" /> 35 <meta name="viewport" content="width=device-width,initial-scale=1"> 36 <meta name="application-name" content="innovadis.com" /> 37 <meta name="author" content="Innovadis BV, Enschede" /> 38 <meta name="copyright" content='Innovadis BV, Enschede, @DateTime.Now.Year' /> 39 <meta name="web_author" content="Innovadis BV, Enschede" /> 40 <link rel="dns-prefetch" href='@requestHost' /> 41 <link rel="icon" href="/favicon.ico" type="image/x-icon" /> 42 <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> 43 <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" type="text/css" rel="stylesheet" /> 44 <link rel="stylesheet" type="text/css" href="@appCss" /> 45 <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700|Ubuntu:300i,400,500,700&display=swap" rel="stylesheet"> 46 @{ var gaHeadCode = TwenteBranding.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(TwenteBranding.Models.Constants.StringConstants.WebsiteSettings.Analytics.GoogleAnalyticsTrackingCode); 47 if (!string.IsNullOrWhiteSpace(gaHeadCode)) 48 { 49 <script> 50 (function (i, s, o, g, r, a, m) { 51 i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { 52 (i[r].q = i[r].q || []).push(arguments) 53 }, i[r].l = 1 * new Date(); a = s.createElement(o), 54 m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) 55 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 56 57 ga('create', '@gaHeadCode', 'auto'); 58 ga('send', 'pageview'); 59 </script> 60 } 61 } 62 @{ var gtmHeadCode = TwenteBranding.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(TwenteBranding.Models.Constants.StringConstants.WebsiteSettings.Analytics.GoogleTagManagerTrackingCode); 63 if (!string.IsNullOrWhiteSpace(gtmHeadCode)) 64 { 65 <script> 66 (function (w, d, s, l, i) { 67 w[l] = w[l] || []; w[l].push({ 68 'gtm.start': 69 new Date().getTime(), event: 'gtm.js' 70 }); var f = d.getElementsByTagName(s)[0], 71 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 72 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 73 })(window, document, 'script', 'dataLayer', '@gtmHeadCode');</script> 74 } 75 } 76 @RenderSnippet("HeadSection") 77 78 @* Print alternate links and content-language meta tags *@ 79 @LanguageHelper.GetMasterLanguageTags(Model.ID) 80 </head> 81 <body> 82 @{ var gtmBodyCode = TwenteBranding.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(TwenteBranding.Models.Constants.StringConstants.WebsiteSettings.Analytics.GoogleTagManagerTrackingCode); 83 if (!string.IsNullOrWhiteSpace(gtmBodyCode)) 84 { 85 var gtmUrl = string.Format("https://www.googletagmanager.com/ns.html?id={0}", gtmBodyCode); 86 <noscript> 87 <iframe src="@gtmUrl" height="0" width="0" style="display:none;visibility:hidden"></iframe> 88 </noscript> 89 } 90 } 91 <main class="twentebranding-container"> 92 @using Dynamicweb.Content 93 @using Dynamicweb.Ecommerce.International 94 @using TwenteBranding.Repository.Helpers 95 @using Page = System.Web.UI.Page 96 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 97 @{ 98 var websiteLanguages = Model.Area.Languages; 99 List<Dynamicweb.Content.Page> topNavigationPages = null; 100 101 int topNavigationFolderId = GetPageIdByNavigationTag("TopNavigation"); 102 if (topNavigationFolderId > 0) 103 { 104 var pageService = new Dynamicweb.Content.PageService(); 105 var topNavigationPageList = pageService.GetPagesByParentID(topNavigationFolderId); 106 if (topNavigationPageList != null && topNavigationPageList.Any()) 107 { 108 topNavigationPages = topNavigationPageList.Where(p => p.Active).ToList(); 109 } 110 } 111 112 var homelinkImage = IconHelper.GetSvgPath("twente", "logo/"); 113 114 <div id="homelink"> 115 <a href="/" target="_top" title="@string.Format(" {0}: {1}", Translate("LinkTitlePrefix", "Navigeer naar" ), Translate("Homelink_Title", "De homepage" )).JsEncode()"><img src="@homelinkImage" alt="@Translate(" Homelink_ImageAlt", "Image met het Twentse Ros die onclick naar de homepge navigeert" )" /></a> 116 </div> 117 118 var searchResultsPageId = AreaHelper.GetAreaItemStringValueBySystemName(TwenteBranding.Models.Constants.StringConstants.WebsiteSettings.PageIds.SearchResults); 119 120 // Top navigation Snippet 121 @SnippetStart("TopNavigation") 122 123 <div class="top-navigation"> 124 @if (topNavigationPages != null && topNavigationPages.Any()) 125 { 126 <ul class="pages"> 127 @foreach (var topNavigationPage in topNavigationPages) 128 { 129 var topNavigationPageName = topNavigationPage.GetDisplayName(); 130 var topNavigationPageTitle = string.Format("{0}: {1}", Translate("LinkTitlePrefix", "Navigeer naar"), topNavigationPageName).JsEncode(); 131 <li><a href="@string.Format("/Default.aspx?ID={0}", topNavigationPage.ID)" title="@topNavigationPageTitle" target="_top">@topNavigationPageName</a></li> 132 } 133 </ul> 134 } 135 136 @if (websiteLanguages != null && websiteLanguages.Any()) 137 { 138 <ul class="languages"> 139 @{ 140 var pageService = new PageService(); 141 var languagePages = pageService.GetLanguagePages(Model.ID); 142 143 foreach (var language in Model.Area.Languages) 144 { 145 var lang = language.Culture.Split('-')[0]; 146 var link = ""; 147 var listClass = language.IsCurrent ? "active" : ""; 148 var langTitle = string.Format("{0}: {1}", Translate("LinkTitlePrefix", "Navigeer naar"), language.Name).JsEncode(); 149 150 if (language.IsMaster && !language.IsCurrent) 151 { 152 var masterAreaPage = pageService.GetPagesByAreaID(1).SingleOrDefault(p => p.GetLanguageVersion(Model.Area.ID) != null && p.GetLanguageVersion(Model.Area.ID).ID.Equals(Model.ID)); 153 if (masterAreaPage != null) 154 { 155 link = string.Format("/Default.aspx?ID={0}", masterAreaPage.ID); 156 } 157 } 158 else if (language.IsCurrent) 159 { 160 link = "javascript:void(0);"; 161 } 162 else 163 { 164 foreach (var languagePage in languagePages) 165 { 166 var languageAreaId = language.ID; 167 if (languageAreaId == languagePage.AreaId) 168 { 169 link = string.Format("/Default.aspx?ID={0}", languagePage.ID); 170 } 171 } 172 } 173 174 //TODO: querystring? 175 176 <li class="@listClass" title="@langTitle"><a href="@link" target="_top">@lang</a></li> 177 } 178 } 179 </ul> 180 } 181 </div> 182 183 @SnippetEnd("TopNavigation") 184 185 // navigation SM 186 <div id="header_mobile" class="d-block d-md-none" data-hometext="@Translate("Navigation_HomeText", "Home")"> 187 <div class="header-mobile-icons"> 188 <a id="mobile-menu-button" class="icon-color--gray-4 icon--hamburger menu-icon"></a> 189 <a id="mobile-search-button" class="icon-color--gray-4 icon--search menu-icon"></a> 190 <a id="mobile-close-button" class="icon-color--gray-4 icon--cross menu-icon"></a> 191 </div> 192 <nav id="mobile-nav" class="navigation-mobile"> 193 @RenderNavigation(new { StartLevel = 1, EndLevel = 2, Template = "LIClean-mobile.xslt", Expandmode = "All" }) 194 <div class="mobile-topnavigation"> 195 @RenderSnippet("TopNavigation") 196 </div> 197 </nav> 198 <div id="mobile-navigation-submenu"></div> 199 200 <div id="mobile-search" class="search-mobile"> 201 @if (!string.IsNullOrWhiteSpace(searchResultsPageId)) 202 { 203 var searchResultUrl = string.Format("/Default.aspx?ID={0}", searchResultsPageId); 204 <form id="searchFormMobile" name="searchForm" method="POST" action="@searchResultUrl"> 205 <div class="top-search"> 206 <div class="input-group"> 207 <input type="text" class="form-control" name="q" id="q" placeholder="@Translate(" Searchbar_Placeholder", "Zoeken" )" aria-label="@Translate(" Searchbar_AriaLabel", "Zoeken" )"> 208 <div class="input-group-append"> 209 <button class="btn icon--search icon-color--gray-4 icon-size--x1 search-button-mobile" type="submit" aria-label="search"></button> 210 </div> 211 </div> 212 </div> 213 </form> 214 } 215 </div> 216 </div> 217 218 // navigation MD+ 219 <div id="header" class="d-none d-md-block"> 220 <div class="container"> 221 222 @RenderSnippet("TopNavigation") 223 224 <nav id="navigation" data-hometext="@Translate("Navigation_HomeText", "Home")"> 225 @RenderNavigation(new { StartLevel = 1, EndLevel = 2, Template = "LIClean.xslt", Expandmode = "All" }) 226 </nav> 227 228 @if (!string.IsNullOrWhiteSpace(searchResultsPageId)) 229 { 230 var searchResultUrl = string.Format("/Default.aspx?ID={0}", searchResultsPageId); 231 <form id="searchForm" name="searchForm" method="POST" action="@searchResultUrl"> 232 <div class="top-search"> 233 <div class="input-group"> 234 <input type="text" class="form-control" name="q" id="q" placeholder="@Translate(" Searchbar_Placeholder", "Zoeken" )" aria-label="@Translate(" Searchbar_AriaLabel", "Zoeken" )"> 235 <div class="input-group-append"> 236 <button class="btn icon--search icon-color--gray-4 icon-size--x1 search-button" type="submit" aria-label="search"></button> 237 </div> 238 </div> 239 </div> 240 </form> 241 } 242 </div> 243 <div id="navigation-submenu"></div> 244 </div> 245 } 246 <main> 247 @using Dynamicweb.Content 248 @using Dynamicweb.Core 249 @using Dynamicweb.Frontend 250 @using TwenteBranding.Models.Constants 251 @using TwenteBranding.Repository.Helpers 252 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 253 @Description("View model template for a job offer page") 254 255 @{ 256 var pService = new PageService(); 257 var iService = new ItemService(); 258 var pageView = PageView.Current(); 259 var culture = pageView.GlobalTags.GetTagByName("Global:Area.LongLang").Value; 260 var itemPageId = pageView.ID; 261 var sidebar = pService.GetPageByNavigationTag(Model.Area.ID, StringConstants.NavigationTags.JobOfferArticleSidebar); 262 263 var item = ItemHelper.GetTwenteBrandingItemForPage(Model.ItemId, itemPageId.ToString(), culture, pService, iService, false); 264 if (item != null) 265 { 266 var hashtag = item.MainHashtag.IsNotNullOrEmpty() ? string.Format("#{0}", item.MainHashtag) : string.Format("#{0}", item.MainHashtagEnglish); 267 268 var goalName = item.GoalName; 269 var background = goalName.FixNameForClass(); 270 var goalIcon = item.GoalIcon; 271 var goalType = item.GoalType; 272 var gradientCss = item.GoalGradientCss; 273 var fontColor = item.HeaderFontColor; 274 275 var title = Model.Item.GetString("Title"); 276 var proposal = Model.Item.GetString("Text"); 277 278 var logo = item.JobCompanyLogo; 279 280 var jobInformation = item.JobInformation; 281 var jobRequirements = item.JobRequirements; 282 var jobApplicationInfo = item.JobApplicationInfo; 283 var jobHoursPerWeek = item.JobHoursPerWeek > 0 ? item.JobHoursPerWeek.ToString() : Translate("JobOfferArticle_HoursPerWeek_Unknown", "-"); 284 var jobEducationalAttainment = (item.JobEducationalAttainment != null && item.JobEducationalAttainment.Any()) ? string.Join(", ", item.JobEducationalAttainment) : Translate("JobOfferArticle_EducationalAttainment_Unknown", "-"); 285 var creationDate = item.JobCreationDate > DateTime.MinValue ? item.JobCreationDate.ToShortDateString() : Translate("JobOfferArticle_CreationDate_Unknown", "-"); 286 var expirationDate = item.JobExpirationDate > DateTime.MinValue ? item.JobExpirationDate.ToShortDateString() : Translate("JobOfferArticle_ExpirationDate_Unknown", "-"); 287 var companyPageId = item.JobCompanyPageId; 288 var jobApplyUrl = item.JobApplyUrl; 289 var jobIntroInformation = item.JobIntroInformation; 290 var jobCompanyInformation = item.JobCompanyInformation; 291 292 var companyTitle = ""; 293 var companyLogo = ""; 294 var companyPhoneNumber = ""; 295 var companyEmailAddress = ""; 296 var companyWebsiteUrl = ""; 297 298 if (companyPageId > 0) 299 { 300 var companyItem = iService.GetItemByPageId(companyPageId, false); 301 if (companyItem != null) 302 { 303 var companyAddress = ItemHelper.GetItemValue<string>(companyItem, StringConstants.CustomItemTypes.PartnerArticle.PartnerFullAddress); 304 if (!string.IsNullOrWhiteSpace(companyAddress)) 305 { 306 companyTitle = ItemHelper.GetItemValue<string>(companyItem, StringConstants.CustomItemTypes.BaseArticle.Title); 307 companyLogo = ItemHelper.GetItemValue<string>(companyItem, StringConstants.CustomItemTypes.PartnerArticle.PartnerLogo); 308 companyPhoneNumber = ItemHelper.GetItemValue<string>(companyItem, StringConstants.CustomItemTypes.PartnerArticle.PartnerPhoneNumber); 309 companyEmailAddress = ItemHelper.GetItemValue<string>(companyItem, StringConstants.CustomItemTypes.PartnerArticle.PartnerEmailAddress); 310 companyWebsiteUrl = ItemHelper.GetItemValue<string>(companyItem, StringConstants.CustomItemTypes.PartnerArticle.PartnerWebsiteUrl); 311 } 312 } 313 } 314 315 <div class="main-container"> 316 <div class="page-title background--@background" style="@item.HeaderBackground;"> 317 <div class="container"> 318 <div class="header-grid"> 319 <div class="title"> 320 321 <h1 class="font-color--twente-red">@title</h1> 322 323 @if (!string.IsNullOrWhiteSpace(jobIntroInformation)) 324 { 325 <div class="sub-header @fontColor">@jobIntroInformation</div> 326 } 327 328 <div class="read-full-article @fontColor">@Translate("JobOfferArticle_Read_Entire_Article", "Lees hieronder de hele vacature")<div class="icon--arrow-down">&nbsp;</div></div> 329 330 </div> 331 @if (!string.IsNullOrWhiteSpace(logo)) 332 { 333 <div class="image"><img class="lazy" data-src="@logo" alt="logo vacature @title"/></div> 334 } 335 </div> 336 </div> 337 </div> 338 339 <div class="page-content container"> 340 <div class="grid detail-grid-container"> 341 <div class="content"> 342 @* ##### FUNCTION DESCRIPTION ##### *@ 343 344 @* functie informatie *@ 345 346 @if (!string.IsNullOrWhiteSpace(jobInformation)) 347 { 348 <h3>@Translate("JobOfferArticle_InformationHeader", "Functie omschrijving")</h3> 349 <div class="joboffer-paragraph">@jobInformation</div> 350 } 351 352 @* ##### JOBOFFER DETAILS ##### *@ 353 354 <div class="joboffer-details"> 355 <h3 class="info">@Translate("JobOfferArticle_Details", "Vacature details")</h3> 356 <div> 357 <div class="row"> 358 <div class="col-6 col-lg-3 order-1 label">@Translate("JobOfferArticle_CreationDate", "Geplaatst op")</div> 359 <div class="col-6 col-lg-3 order-2">@creationDate</div> 360 <div class="col-6 col-lg-3 order-3 order-lg-5 label">@Translate("JobOfferArticle_ExpirationDate", "Vervaldatum")</div> 361 <div class="col-6 col-lg-3 order-4 order-lg-6">@expirationDate</div> 362 <div class="col-6 col-lg-3 order-5 order-lg-3 label">@Translate("JobOfferArticle_HoursPerWeek", "Aantal uur")</div> 363 <div class="col-6 col-lg-3 order-6 order-lg-4">@jobHoursPerWeek</div> 364 <div class="col-6 col-lg-3 order-7 label">@Translate("JobOfferArticle_EducationalAttainment", "Opleidingsniveau")</div> 365 <div class="col-6 col-lg-3 order-8">@jobEducationalAttainment</div> 366 </div> 367 </div> 368 </div> 369 370 @* ##### FUNCTION REQUIREMENTS ##### *@ 371 372 @* functie=eisen *@ 373 374 @if (!string.IsNullOrWhiteSpace(jobRequirements)) 375 { 376 <h3>@Translate("JobOfferArticle_RequirementsHeader", "Functievereisten")</h3> 377 <div class="joboffer-paragraph">@jobRequirements</div> 378 } 379 380 @* ##### PROPOSAL ##### *@ 381 382 @* Aanbod *@ 383 384 @if (!string.IsNullOrWhiteSpace(proposal)) 385 { 386 <h3>@Translate("JobOfferArticle_Proposal", "Aanbod")</h3> 387 <div class="joboffer-paragraph">@proposal</div> 388 } 389 390 @* ##### COMPANY PROFILE ##### *@ 391 392 @* Alinea titel: Bedrijfsprofiel + bedrijfsnaam *@ 393 394 @* organisatie-en afdelingsomschrijving *@ 395 396 @if (!string.IsNullOrWhiteSpace(jobCompanyInformation)) 397 { 398 <h3>@Translate("JobOfferArticle_CompanyHeader", "Bedrijfsprofiel") @companyTitle</h3> 399 <div class="joboffer-paragraph">@jobCompanyInformation</div> 400 } 401 402 @* ##### APPLY ##### *@ 403 404 @* Solliciteren bij *@ 405 406 @if (!string.IsNullOrWhiteSpace(jobApplicationInfo)) 407 { 408 <h3>@Translate("JobOfferArticle_ApplicationHeader", "Solliciteren")</h3> 409 <div class="joboffer-paragraph">@jobApplicationInfo</div> 410 } 411 412 @if (!string.IsNullOrWhiteSpace(jobApplyUrl)) 413 { 414 <div class="jobApplyUrl"> 415 <a class="button red" target="_blank" href="@jobApplyUrl">@Translate("Job_apply", "Solliciteer")</a> 416 </div> 417 } 418 @* ######################### *@ 419 420 @if (companyPageId > 0) 421 { 422 var companyItem = iService.GetItemByPageId(companyPageId, false); 423 if (companyItem != null) 424 { 425 var companyAddress = ItemHelper.GetItemValue<string>(companyItem, StringConstants.CustomItemTypes.PartnerArticle.PartnerFullAddress); 426 if (!string.IsNullOrWhiteSpace(companyAddress)) 427 { 428 <div class="partner-information"> 429 430 <h3 class="partner-information-title info">@Translate("JobOfferArticle_More_Info", "Meer informatie")</h3> 431 432 <div class="partner-information-details"> 433 @if (!string.IsNullOrWhiteSpace(logo)) 434 { 435 <div> 436 <img src="@companyLogo" alt="logo @companyTitle" class="logo" /> 437 </div> 438 } 439 440 <div> 441 @if (!string.IsNullOrWhiteSpace(companyAddress)) 442 { 443 <span class="info address">@companyAddress.NewlineToBr()</span> 444 } 445 446 @if (!string.IsNullOrWhiteSpace(companyPhoneNumber)) 447 { 448 <span class="info phoneNumber">@companyPhoneNumber</span> 449 } 450 </div> 451 452 @if (!string.IsNullOrWhiteSpace(companyEmailAddress) || !string.IsNullOrWhiteSpace(companyWebsiteUrl)) 453 { 454 <div> 455 @if (!string.IsNullOrWhiteSpace(companyEmailAddress)) 456 { 457 <span class="info e-mailaddress"><a href="mailto:@companyEmailAddress" target="_blank">@companyEmailAddress</a></span> 458 } 459 @if (!string.IsNullOrWhiteSpace(companyWebsiteUrl)) 460 { 461 var websiteLink = companyWebsiteUrl; 462 if (!websiteLink.ToLower().StartsWith("http")) 463 { 464 websiteLink = string.Format("https://{0}", companyWebsiteUrl); 465 } 466 <span class="info website-url"><a href="@websiteLink" target="_blank">@companyWebsiteUrl</a></span> 467 } 468 </div> 469 } 470 471 </div> 472 </div> 473 } 474 } 475 } 476 477 <div class="share background--twente-red font-color--white"> 478 479 <div class="social-title"> 480 @Translate("JobOfferArticle_Share", "<strong>Deel</strong> deze vacature") 481 </div> 482 483 <div class="social-media-icon-container"> 484 <!-- AddToAny BEGIN --> 485 <div class="a2a_kit a2a_kit_size_32 a2a_default_style"> 486 <a class="a2a_button_facebook icon--sm_facebook"></a> 487 <a class="a2a_button_twitter icon--sm_twitter"></a> 488 <a class="a2a_button_linkedin icon--sm_linkedin"></a> 489 <a class="a2a_button_whatsapp icon--sm_whatsapp"></a> 490 </div> 491 <script> 492 var a2a_config = a2a_config || {}; 493 a2a_config.locale = @culture; 494 </script> 495 <script async src="https://static.addtoany.com/menu/page.js"></script> 496 <!-- AddToAny END --> 497 </div> 498 </div> 499 500 </div> 501 502 @if (sidebar != null) 503 { 504 <div class="sidebar"> 505 @RenderPageContent(sidebar.ID) 506 </div> 507 } 508 509 510 @if (Model.Placeholder("Bottom").Any()) 511 { 512 <div class="bottom"> 513 @Model.Placeholder("Bottom") 514 </div> 515 } 516 517 </div> 518 </div> 519 </div> 520 <script>console.log("PublicationId:", @item.JobPublicationId)</script> 521 } 522 else 523 { 524 <div>No-Item</div> 525 } 526 } 527 </main> 528 @using Dynamicweb.Frontend 529 @using TwenteBranding.Models.Constants 530 @using TwenteBranding.Repository.Helpers 531 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 532 533 @{ 534 var hashTags = AreaHelper.GetFooterHashTags(Model); 535 var hashTagsTitleField = Model.Area.Item.GetField(StringConstants.ItemInstanceType.FooterTagsTitle).GetValue(); 536 var hashTagsTitle = hashTagsTitleField == null ? "" : hashTagsTitleField.ToString(); 537 if (hashTags.Count > 0) 538 { 539 <div class="background--gray-1"> 540 541 <div class="hashtags-container container"> 542 @{ 543 if (!string.IsNullOrEmpty(hashTagsTitle)) 544 { 545 <div class="title"> 546 @hashTagsTitle 547 </div> 548 } 549 } 550 <div class="hashtags font-color--twente-red"> 551 @foreach (var tag in hashTags) 552 { 553 <a href="@SearchEngineFriendlyURLs.GetFriendlyUrl(tag.ID)">#@tag.MenuText</a> 554 } 555 </div> 556 </div> 557 </div> 558 } 559 } 560 561 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 562 <footer class="background--twente-red"> 563 <div class="container"> 564 <div class="social-media-icon-container"> 565 @using TwenteBranding.Repository.Helpers 566 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 567 568 @if (Model.Area.Item != null) 569 { 570 <ul> 571 @foreach (var field in Model.Area.Item.Fields.Where(f => f.SystemName.StartsWith("Sm_"))) 572 { 573 if (!string.IsNullOrEmpty(field.GetString())) 574 { 575 <li> 576 <a rel="noopener" aria-label="@field.Name.JsEncode()" href="@field.GetString()" title="@field.Name.JsEncode()" target="_blank"> 577 <div class="social-media-icon icon--@field.SystemName.ToLower() icon-size--x2"></div> 578 </a> 579 </li> 580 } 581 } 582 </ul> 583 } 584 </div> 585 <div class="footer-link-container"> 586 @{ 587 List<Dynamicweb.Content.Page> footerNavigationPages = null; 588 int footerNavigationFolderId = GetPageIdByNavigationTag(TwenteBranding.Models.Constants.StringConstants.NavigationTags.FooterNavigation); 589 if (footerNavigationFolderId > 0) 590 { 591 var pageService = new Dynamicweb.Content.PageService(); 592 var footerNavigationPageList = pageService.GetPagesByParentID(footerNavigationFolderId); 593 if (footerNavigationPageList != null && footerNavigationPageList.Any()) 594 { 595 footerNavigationPages = footerNavigationPageList.Where(p => p.Active).ToList(); 596 if (footerNavigationPages != null && footerNavigationPages.Any()) 597 { 598 var footerLinkCounter = 1; 599 foreach (var footerNavigationPage in footerNavigationPages) 600 { 601 var footerNavigationPageName = footerNavigationPage.GetDisplayName(); 602 var footerNavigationPageTitle = string.Format("{0}: {1}", Translate("LinkTitlePrefix", "Navigeer naar"), footerNavigationPageName).JsEncode(); 603 var footerNavigationPageLink = string.Format("/Default.aspx?ID={0}", footerNavigationPage.ID); 604 605 if (footerNavigationPages.Count() == footerLinkCounter) 606 { 607 var copyRight = string.Format(Translate("Footer_CopyRight", "&copy; {0} Twente Branding"), DateTime.Now.Year); 608 609 <div class="footer-link-wrapper"> 610 <div class="footer-link"> 611 <a href="@footerNavigationPageLink" title="@footerNavigationPageTitle">@footerNavigationPageName</a> 612 </div> 613 <div class="footer-link"><span>@copyRight</span></div> 614 </div> 615 } 616 else 617 { 618 <div class="footer-link"> 619 <a href="@footerNavigationPageLink" title="@footerNavigationPageTitle">@footerNavigationPageName</a> 620 </div> 621 } 622 footerLinkCounter++; 623 } 624 } 625 } 626 } 627 } 628 </div> 629 </div> 630 </footer> 631 632 </main> 633 <script src="https://code.jquery.com/jquery-2.2.4.min.js" 634 integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" 635 crossorigin="anonymous"></script> 636 <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js"></script> 637 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.9/jquery.lazy.min.js"></script> 638 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery.lazy/1.7.9/jquery.lazy.plugins.min.js"></script> 639 640 <script src="@appJs"></script> 641 @RenderSnippet("JavascriptBottom") 642 </body> 643 </html> 644 }