AI OnAI Off
If you have the PageData object you can get all the category ids that are selected using: CurrentPage.Category (where CurrentPage is a PageData object) which returns a CategoryList. You can then use Category.Find() (static method) to get the Category object for each item in the CategoryList.
Hope this helps.
Frederik
For anyone interested in the above... I managed to get a list (string) of the selected category names with this method:
public string getCatNames(CategoryList c)
{
string temp = "";
Category cat;
for (int i = 0; i < c.Count; i++)
{
cat = Category.Find(c.ElementAt(i));
temp += cat.Name+",";
}
temp = temp.TrimEnd(',');
return temp;
}
Hi!
How can I collect/read what categories are selected on a page (selected in edit mode - from the tab)...? I would like to have all selected categories in some kind of list/array.
I'm having different events and I'm trying to create a page that will display surtain events... depending on what category (or categories) are selected.