London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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