Compare versions
# help-with-umbraco
j
Using Umbraco 11. Is there a way to get Page content based off a version ID that I can use to compare 2 versions? Similar to Roll back?
s
I'm not sure what you need.. ? But if you just want to replicate something like the rollback function you can look at your browser's dev tools while tap the rollback button. You should see urls like
umbraco/backoffice/umbracoapi/content/GetPagedContentVersions?contentId=1679&pageNumber=1&pageSize=15&culture=
and
umbraco/backoffice/umbracoapi/content/GetRollbackVersion?versionId=242&culture=
which shuold be useful for getting the data you need.
m
I think they want to have something like a diff compair. Look at the content of Verion 2 and compair it to Version 4 to see the differences
j
@jonroberts I thought I recognised this question and on searching I was right! You asked the same thing back in 2016! You could use the content service to get the different versions and then compare the ones you want, e.g. var content = _contentService.GetVersions(1); There are a couple of other overloads that could help like GetVersionIds and GetSlimVersion
j
Thanks - I have the memory of a 50 year old - which is bad news as I am 50
4 Views