Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Hi,
Did you try code like:
@foreach (int category in this.Model.CurrentPage.Category) { var name = EPiServer.ServiceLocation.ServiceLocator.Current.GetInstance<EPiServer.DataAbstraction.CategoryRepository>().Get(category).Name; <div>@name</div> }
Hi,
How, in Razor, do you get a page's Categories that have been tagged in the CMS. I cant seem to use CurrentPage - it isnt an option in my Model.
Jon