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
Thanks Per!
this is what i had to do:
producLink is my contentreference
var versionRepo = ServiceLocator.Current.GetInstance<IContentVersionRepository>();
var latestVersion = versionRepo.List(productLink).Last().ContentLink;
// get the last item in array
versionRepo.SetCommonDraft(latestVersion);
//set the last item as default
don't forget to use SaveAction.ForceCurrentVersion when saving
Hi
we are saving pages from code but when looking in cms we can´t see the latest saved version
how do we set the latest saved version to default ?
thanks!
Regards
Pawel