Copied to clipboard

Flag this post as spam?

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


  • Carlos 338 posts 472 karma points
    Aug 28, 2014 @ 18:11
    Carlos
    0

    Multi site, get data or content across sites?

    We are looking at setting up a multisite instance of Umbraco with multiple rootnodes.  

    site1.mydomain.com

    site2.mydomain.com

    site3.mydomain.com

    Is there a way for site2 to pull data or content entered in site3? Would we just be pulling the rootnode ID for the site?

    Thanks,

     

    Carlos

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Aug 28, 2014 @ 19:09
    Dennis Aaen
    0

    Hi Carlos,

    Yeah one way is to pull data from a specific node by access it by the ID like this

    @{ 
    var page = Umbraco.Content(1234);

    @page.PropertyAlias
    }

    http://our.umbraco.org/documentation/Reference/Querying/UmbracoHelper/#Content%28intid%29

    The disadvantage of access data from a specific ID  is of course if the page is deleted with the ID, so will the code where you retrieve data from break.

    If your sites have different document types, then you could use them to access the data. If it´s spots that you want to use on all sites, I have seen setups, where you created them on one folder called e.g Content elements, and on the pages, the user can select these elements by using a Multi Node Tree Picker.

    Or make a node that contains all the shared content between the different sites.

    Hope this can help you at some point.

    /Dennis

  • Carlos 338 posts 472 karma points
    Aug 28, 2014 @ 20:32
    Carlos
    0

    @Dennis,

    That solution where content can be shared is more or less the approach we are looking at taking.  The Multi Node Tree Picker sounds like a good option.

    So then the Tree picker can read all nodes in all sites of the Umbraco instance?

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Aug 28, 2014 @ 20:43
    Dennis Aaen
    0

    Hi Carlos,

    I don´t think it´s a good idea to do it that way, because then the user will experience the site change, if you link to something on site 3 and you are on site 2.

    The thing I was talking about with the Multi Node Tree Picker was to make a folder under Content (at the root) e.g called shared content, and in the folder you create all the content that should be shared between the sites, and with the Multi Node Tree Picker then pick the elements that you want to each sites.

    Hope this make sense.

    /Dennis

  • Carlos 338 posts 472 karma points
    Aug 29, 2014 @ 17:56
    Carlos
    0

    Oh, so you are talking about doing a structure like this then

    Root

    --Share Content

    --Site One

    --Site Two

    -- Site Three

    Am I understanding you correctly?

    I see what you are saying now. I forgot the Root is not actually the site hostname. The subfolders hold the hostnames.

    I see what you are talking about.  

     

Please Sign in or register to post replies

Write your reply to:

Draft