Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Hi,
Try this (page is a PageData object)
var category = Category.Find("fish"); if (category != null) { bool isOfCat = page.Category.MemberOf(category.ID); }
/Michel
Hi
Thanks, worked perfectly!
If any one else should find this useful:
Just remember to add a reference to EpiServer.DataAbstraction namespace :-)
/Jonas
Hello
I want to check to see whether a certain category exists for a page. I have pagedata and from that i can access category, right?
But how do i loop through the categories for that page to see if anyone matches the category i look for?
Example
I'm looking for a category called "fish" now i have page A and want to find out if page A has the category fish added to it.
/Jonas