Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • jbgoldcoast 3 posts 20 karma points
    May 26, 2009 @ 08:46
    jbgoldcoast
    0

    Loading Umbraco-managed content in an external .NET site

    Hello,

    Has anyone made an implementation of using Umbraco purely as a CMS, able to serve content to a separate (non-umbraco) .NET website?

    The scenario I'm thinking of is, like Master Pages have contentplaceholder controls, a .NET site could have umbraco controls that use a URL or some kind of ID and authentication to load content into placeholders on the .NET site.
    Or, if the umbraco API supports interaction from external sites, custom controls could be written to invoke the umbraco API and create an UmbracoContentPlaceholder control.

    Behind the scenes, staff could publish updates to this content (but no new content without external site changes first, ie. new placeholders) using Umbraco's interface. A dummy template could be constructed to accurately reflect styles & themes as they would appear on the .NET site.

    I would appreciate any thoughts from Umbraco support staff and users.
    Thanks!
    -Jason

  • Daniel Lindstrom 454 posts 271 karma points
    May 26, 2009 @ 10:05
    Daniel Lindstrom
    0

    I have used umbraco as a data server for external sites/flash/apps etc on several occasions. I think this is one of umbraco strongest areas. It is really so simple to publish content for external use.

    But I have never done it the way you propose, and it does seem a bit overly complicated to me.

    I create an xslt macro that writes out the xml, html or rss etc wanted, put that on an otherwise empty template in umbraco.

    From the external app call an umbraco page with that template and read the output.

    You can now use/display the content fetched from umbraco in your app/site.

    When using this on web sites for hmtl content I most often fetch it async from the client usin ajax (jquery style). But I have also had the output read and processed server side by the app by loading the xml from a url, then sending it to the client together with other data from the app.

  • jbgoldcoast 3 posts 20 karma points
    May 27, 2009 @ 01:36
    jbgoldcoast
    0

    Brilliant, can you point me in the direction of documentation for the API call, or as you mentioned 'loading the xml from a url' what that URL looks like?

    The .NET thing isn't really overly complicated, it could be as simple as saying
    string umbracoHTML = //get HTML from Umbraco for template x
    myControl.text = umbracoHTML

    Or a neater way would be to wrap that logic in a custom control so you don't have to write that code every time. Something like

    Could then get the HTML from template x and put it in the page, without any other code being written.

    If you wanted to go nuts you could write the custom control so that it had a server-side or a client-side mode :P but that's prob overkill at the moment haha. Caching would be worth a look though.

  • jaygreasley 416 posts 403 karma points
    Aug 29, 2009 @ 10:24
    jaygreasley
    0

    I *think* you may be able to use  /Base for this without needing the xslt macro that generates the xml

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies