Hi,
In my application, I have 3 levels of navigation and pages which I created. I use the following code to get the SubPages
public class AccordionContainerViewModel : PageViewModel { private static IContentRepository ContentRepository => ServiceLocator.Current.GetInstance<IContentRepository>(); public List<AccordionSubPage> SubPages { get; set; } public AccordionContainerViewModel(AccordionContainerPage currentPage) : base(currentPage) { var subPages = ContentRepository.GetChildren(currentPage.ContentLink); SubPages = subPages.ToList(); } }
Since I am new to EPiServer, I want to get SubPages of each of my SubPages (Basically each Accordion content inside of each sub page) as well and put them in another List to have access in my view for navigation purposes, for instance, SubSubPages.
Thank you for your time and consideration.