London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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.