Hi, am new new episerver cms - using version 11.
I have the following page structure in my procject:
+Root
+ Home
+ Landing Page
+ Sub Page ( of Landing Page )
+ Sub Page ( of Landing Page )
On my SubPage Type, I have a 'Sections' property that i iterate through in the view.
AllowedTypes(typeof(HeadingAndTextBlock))] public virtual ContentArea Sections { get; set; }
The blocks have been added to the ContentArea section only.
My question(s) are:
- How do I create links to blocks in other pages of the site and managed them in the cms?
- On the Landing Page, how do I manage the content shown based on the blocks already created in the Sub Page(s) ContentArea property?
[Headig and Text Block]
[ContentType] public class HeadingAndTextBlock : BlockData { [Display(Name = "Heading", GroupName = SystemTabNames.Content)] public virtual XhtmlString Heading { get; set; } [Display(Name = "Sub Heading", GroupName = SystemTabNames.Content)] public virtual XhtmlString SubHeading { get; set; } [Display(Name = "Bullet Points", GroupName = SystemTabNames.Content)] public virtual XhtmlString TextContent { get; set; } }
[Page Type]
public class SubPage : GlobalBasePage { [Display(Name = Global.Pages.SubPage.SUB_PAGE + " Sections")] [AllowedTypes(typeof(HeadingAndTextBlock))] public virtual ContentArea Sections { get; set; } }
[ContentType(DisplayName = Global.Pages.LandingPage.LANDING, GroupName = SystemTabNames.Content)] public class LandingPage : GlobalBasePage { [Display(Name = "Sub Page Links/References")] [AllowedTypes(typeof(HeadingAndTextBlock), RestrictedTypes = new[] { typeof(HeadingAndTextBlock) })] public virtual ContentReference Reference { get; set; } /* This is where im tring to link to other blocks in the sub page ^^ */ }