Copied to clipboard

Flag this post as spam?

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


  • darryn 3 posts 23 karma points
    Nov 06, 2012 @ 09:07
    darryn
    0

    Extract Umbraco's data to view in a private website

    Good Morning Gents,

     

    I'm stuck in a situation whereby I have to extract some data from an Umbraco Website into a another site..  

    How would i go about referencing the current Umbraco site's data in the new site i'm in the process of creating??

     

    Kind Regards

    Darryn Smith

    @: [email protected]

  • Thomas 66 posts 88 karma points
    Nov 06, 2012 @ 10:02
    Thomas
    0

    Hi Darryn

    One option would be to create a template in the Umbraco site, that contains the data you need in an XML format (you can design the template to output in any format), and then access that template from the other site. This approach would be appropriate if the data is updated frequently.

    Another option is to export the data using a package (http://our.umbraco.org/projects/website-utilities/eyecatch-csv-export) which would be an option if you only need the content once in a while.

    A third option would be to create templates for the data-items you need.

    Finally, if you have no intention of digging into Umbraco you can get all data in XML format in a file called umbraco.config in the data folder.

  • darryn 3 posts 23 karma points
    Nov 06, 2012 @ 10:23
    darryn
    0

    Thanks for the quick response Thomas ..

    I need to build an mobile web application that reads data from an exisiting umbraco site.. Now please take into consideration, that I've never worked with this CMS before so excuse the noob questions..

    If I take up your first option, and create an automated XML template to the existing Umbraco site in XML format..

    How would I go about referencing and extracting the XML template from that specific Umbraco account? in my HTML/javascript/potentially PHP application?

    Take into mind that I'm working with the following technologies:

    *HTML/HTML5,

    *Javascript and CSS3,

    *Potentially PHP

     

    Thanks Again... :D

    Darryn Smith

    @mail : [email protected]

  • Thomas 66 posts 88 karma points
    Nov 06, 2012 @ 11:06
    Thomas
    0

    OK, if you are working with javascript - a possible approach would be to get the content of a node (page, product item etc) as Json. There is a package for that here:

    http://our.umbraco.org/projects/website-utilities/node-2-json

    This package creates a template that can be applied to any node and retrieved just by adding a short string to the URL of that node.

    The same would be the case if you added a template that outputs the data in XML-format. 

    An example the node (a product) you want data from is accessed at

    www.yourdomain.com/popularproducts/agreatproductname.aspx

    using one of the two approaches you would access the data by calling:

    www.yourdomain.com/popularproducts/agreatproductname/yourtemplatename.aspx

    with the node-2-json this would not require any programming at all (if the data is contained as properties to a node in Umbraco)

  • Thomas 66 posts 88 karma points
    Nov 06, 2012 @ 11:08
    Thomas
    0

    I can see that Our Umbraco has shortened the URL's please see the full link

  • darryn 3 posts 23 karma points
    Nov 06, 2012 @ 11:47
    darryn
    0

    Thanks Again Thomas..

    Could this process also however be automated somehow? What's the difference between this method and using the web services option because I just found out now that the web services to the Umbraco site currently exists already so my next question is how would I go about accesing the existing web services from a HTML page?

    I appologize once again for all the noob q's and thank you for reply'ing to them.. Much Appreciated :D

    Darryn Smith 

  • Thomas 66 posts 88 karma points
    Nov 07, 2012 @ 09:30
    Thomas
    0

    I have no experience using Umbraco as a webservice, but the main difference is the required programming knowledge - the webservice requires more backend capabilities, than just installing the node-2-json package.

    The webservice is excellent if you want to exchange private data between the two applications, as the service can be configured to only allow specific authenticated users. In your case it sounds like the data is already publicly available, which suggests that the first option is sufficient.

    Your next question about accessing the data depends on the chosen method. It is not an Umbraco specific question so try look at general ressources about parsing json (eg. http://www.w3schools.com/json/tryit.asp?filename=tryjson_parse )

     

     

Please Sign in or register to post replies

Write your reply to:

Draft