1) Use Umbraco on one site and pull the data in through an iFrame component (or other mechanism) on the other site
2) Develop a web service for Umbraco that would hook in to the existing site and pull the relevent information over to the other site.
Realistically, you could pass a node id or friendly name over to the web service, and the service could return the XML document for your site to parse. However, things like images, members, macros and other linked objects in the XML document that reference other Umbraco nodes would need to be translated into some form of HTML for rendering. This does work for pulling raw data across (or pushing data back). I have used this technique to automate passing member objects and other data items between sites when necessary.
Conceptually, you could pass a node id or friendly name over to the web service, and the service could return a StreamReader object that contained the rendered HTML from Umbraco. I have never tried this, but it is possible in theory.
3) Use the REST API to pass data from Umbraco to your site. Again, images and other linked objects could potentially be an issue. I have not used the REST API, so hopefully someone else could comment on how it works in more detail.
Take a look at RenderTemplate, takes a node id and a template id and render the HTML it for you.
I have used it in scenarios similar to what you describe.
Very simple scenario:
Another page/site calls a page on your umbraco installation (from server, or client using something like jquery ajax). This page uses a template that only holds an xslt macro. The node id to be rendered as a querystring parameter. This macro on the page renders the node using RenderTemplate.
You could also have the xslt macro return xml or json, without rendering HTML.
1. API has some methods to a page using a specified template. don't know the syntax by heart, but i do know that it has been fixed in v4 as that wasn't working in v3
2. Again, umbraco api to the rescue, and for collecting data from the umbraco site, use the nodeFactory (umbraco.presentation) as this handles with published content xml in a performant and readonly way.
It's alos possible to query documents in the umbraco install, even if not published, but would advice against that as that would involve lots of db interaction
Umbraco site as a datafeed?
Is there any comfortable way of using umbraco site as an editing system for another, non-umbraco site?
For example, compose pages to display on non-umbraco site without having umbraco source code in the solution.
Three things readily come to mind on this.
1) Use Umbraco on one site and pull the data in through an iFrame component (or other mechanism) on the other site
2) Develop a web service for Umbraco that would hook in to the existing site and pull the relevent information over to the other site.
Thank you, Chris, so much.
I liked the idea with the webservice called with nodeId param, but have some more questions:
Take a look at RenderTemplate, takes a node id and a template id and render the HTML it for you.
I have used it in scenarios similar to what you describe.
Very simple scenario:
Another page/site calls a page on your umbraco installation (from server, or client using something like jquery ajax). This page uses a template that only holds an xslt macro. The node id to be rendered as a querystring parameter. This macro on the page renders the node using RenderTemplate.
You could also have the xslt macro return xml or json, without rendering HTML.
Hi stigmata86,
1. API has some methods to a page using a specified template. don't know the syntax by heart, but i do know that it has been fixed in v4 as that wasn't working in v3
2. Again, umbraco api to the rescue, and for collecting data from the umbraco site, use the nodeFactory (umbraco.presentation) as this handles with published content xml in a performant and readonly way.
It's alos possible to query documents in the umbraco install, even if not published, but would advice against that as that would involve lots of db interaction
Hope this helps.
Regards,
/Dirk
i have used various areas of an umbraco site to feed widgets, etc. so feeding other websites should be the same...
you could write macros to output xml or json and call the page with the macro and parse them on the other site
is working on a reply...