Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Have you created a view for the new page type? .HasTemplate() will remove pages that has no template/view.
Thanks Johan. Yes, there is a template for this view.
Troubleshooting this a bit more, we have some alternate code that builds the navigation tree in a separate class, which is actually finding the new page type children. It's a lot cleaner than the original implementation posted above, so I'm going to run with that. Thanks for helping me out.
We have a developer who added a new page type to our EpiServer 8.0.0.0 application. Upon adding pages of the new type via the CMS admin interface, we are able to see the new pages in the EpiServer Admin Navigation Pane.
However, code that we have written to display navigable pages in a Site Map or a navigation menu fails to render these new pages. Why do they successfully appear in the CMS Admin interface, but fail to render otherwise?
Our site is originally based off Alloy. Here is the new page type our developer created.
And here is an example of the Razor code. When the SubNav collection gets filled, we expect that the new pages will be retrieved by GetChildren(). But they never appear. I've added some comments below showing where this fails.
Since the pages appear in the Episerver CMS admin interface successfully, I suspect the problem rests with how we are executing GetChildren, or that we need to take a different approach. Thanks for your help.