From 9f2d666bed9687ab4cec3b6263795a59886005c3 Mon Sep 17 00:00:00 2001 From: samantha copeland Date: Sun, 28 Apr 2024 14:21:49 -0500 Subject: [PATCH] page payload get parent's sibling event calendar formatting improvement --- CMSCore/MVC/PagePayload.cs | 15 ++++ .../Views/Home/EventCalendarDisplay.cshtml | 69 ++++++++++--------- .../Views/Home/EventCalendarDisplay2.cshtml | 27 +++++--- 3 files changed, 70 insertions(+), 41 deletions(-) diff --git a/CMSCore/MVC/PagePayload.cs b/CMSCore/MVC/PagePayload.cs index cd08393..c2f1448 100644 --- a/CMSCore/MVC/PagePayload.cs +++ b/CMSCore/MVC/PagePayload.cs @@ -256,6 +256,21 @@ public List SiblingNav { } } + private List _parentsib = null; + + public List ParentSiblingNav { + get { + if (_parentsib == null) { + using (ISiteNavHelper navHelper = SiteNavFactory.GetSiteNavHelper()) { + _parentsib = navHelper.GetSiblingNavigation(this.TheSite.SiteID, this.ThePage.Parent_ContentID ?? Guid.Empty, !SecurityData.IsAuthEditor); + } + _parentsib = TweakData(_parentsib); + } + + return _parentsib; + } + } + private SiteNav _parentnav = null; public SiteNav ParentNav { diff --git a/PluginEventCalendarModule/Views/Home/EventCalendarDisplay.cshtml b/PluginEventCalendarModule/Views/Home/EventCalendarDisplay.cshtml index 1730b2d..b64b7de 100644 --- a/PluginEventCalendarModule/Views/Home/EventCalendarDisplay.cshtml +++ b/PluginEventCalendarModule/Views/Home/EventCalendarDisplay.cshtml @@ -1,4 +1,4 @@ -@model CalendarViewModel +@model CalendarViewModel