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
Hi,
You can do something like this
var category = new Category("Name", "Description");
Category.GetRoot().Categories.Add(category);
var categories = CurrentPage.Category;
categories.Add(category.ID);
var page = CurrentPage.CreateWritableClone();
page.Category = categories;
ServiceLocator.Current.GetInstance().Save(page, SaveAction.Publish);
I are having problem find out how programmatically add a category to a page.
Can anyone share some insight on how this is done?