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
This should give you all child categories (if any) for paritcular assign category for the page.
Category c = Category.Find(CurrentPage.Category.First());
CategoryCollection allChildCategories = c.Categories;
What you do with CategoryCollection and how you move that to ViewModel is up to you - either you access this from view itself, add it to viewmodel as collection of categories or map to some more abstract-not-related-to-EPiServer-collection and then process and render that on the view. It depends on your overall MVC app structure and approach.
I'm building a website that will have a FAQ section.
On the FAQ page i'ld like to list all subcategories to Category named "FAQ". Clicking on a tag will then filter the faq items with ajax (I'll figure out this later)
How do I get a list av subcategories and write out them in a view in EPiServer 7 MVC Razor?
Thanks in advance.