AI OnAI Off
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