A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn 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?