🔧 Maintenance Alert: World will be on Read-Only Mode on February 18th, 10:00 PM – 11:00 PM EST / 7:00 PM – 8:00 PM PST / 4:00 AM – 5:00 AM CET (Feb 19). Browsing available, but log-ins and submissions will be disabled.
AI OnAI Off
🔧 Maintenance Alert: World will be on Read-Only Mode on February 18th, 10:00 PM – 11:00 PM EST / 7:00 PM – 8:00 PM PST / 4:00 AM – 5:00 AM CET (Feb 19). Browsing available, but log-ins and submissions will be disabled.
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?