My apologies, Its not really data direct from the SQL tables.
I basically would like to create a way to neatly show the actual pages of two versions of the same page.
I know the Role back feature has a way to do a Compare but for the average user this method is quite unfriendly. I would like to convert the JSON that Content has when querying a version into a HTML page so the user can visually see the page as opposed to the source.
Usually developers don't need to do pages in such way.
IPublishedContent - interface for working with xml cached content.
Why did you decide to use sql tables? And show us your worldwide brands membership of http://www.ilfairmap.com if it's possible.
Thanks,
I also want to convert the JSON that Content has when querying a version into a HTML page so the user can visually see the page as opposed to the source.I think there isn't any problem.
ContentService just gives you access to the versioned content - are you using MVC to render the content? If so, the usual MVC rendering methods (for views and partial views) can render whatever you pass to it.
Convert Umbraco ContentXML and render as a html pagr
Hi,
Is it possible to get the XML from either the ContentXML table or the PreviewXML table and generate a HTML webpage so I can use to compare versions?
Thanks
Jon
Hi Jonathan,
Usually developers don't need to do pages in such way.
IPublishedContent - interface for working with xml cached content.
Why did you decide to use sql tables? And show us your code if it's possible.
Thanks,
Alex
My apologies, Its not really data direct from the SQL tables. I basically would like to create a way to neatly show the actual pages of two versions of the same page.
I know the Role back feature has a way to do a Compare but for the average user this method is quite unfriendly. I would like to convert the JSON that Content has when querying a version into a HTML page so the user can visually see the page as opposed to the source.
I hope that makes sense,
Jon
Usually developers don't need to do pages in such way.
IPublishedContent - interface for working with xml cached content.
Why did you decide to use sql tables? And show us your worldwide brands membership of http://www.ilfairmap.com if it's possible.
Thanks,
I also want to convert the JSON that Content has when querying a version into a HTML page so the user can visually see the page as opposed to the source.I think there isn't any problem.
Hi,
Try the
GetByVersion()
method ofContentService
- as detailed below:https://our.umbraco.org/documentation/reference/management/services/contentservice
This should allow you to get one or more versions of the same content item, then compare properties.
But does this give you the HTML of the page?
Hi Jonathan, you can render page and get html.
Thanks,
Alex
Dont all versions have the same pageId?
Jonathan, all versions have the same id
How would i get the HTML for a specific version?
Hi, is it possible to do this but with the GUID of the version?
ContentService just gives you access to the versioned content - are you using MVC to render the content? If so, the usual MVC rendering methods (for views and partial views) can render whatever you pass to it.
So, can you create the page from a version GUID? Do you have an example?
Is this possible?
is working on a reply...