Copied to clipboard

Flag this post as spam?

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


  • samyhrer 4 posts 24 karma points
    Dec 17, 2014 @ 16:56
    samyhrer
    0

    Umbraco Site Architecture - Multiple sites that share content

    Hi.

    I'm fairly new to Umbraco, only spent a few days evaluating version 7.2 for an upcoming project. So far it has met almost all of my demands. I would really appreciate some advice on how to organize my data in order to support the following unsolved scenario:

    I will have to support multiple sites that share a common set of content, but each site will only show a subset of it. Which content should be visible where is configured by the editor by adding metadata to the content, i.e checkboxes such as

    [x] Show in Site X 
    [x] Show in site Y 
    [  ] Show in site Z

    A piece of content can be visible at multiple sites at the same time.

    In essence all pages that aggregate data, as well as site search, within a site needs to filter out non-relevant content. Workflow is shared, so visibility on each site is, after the item is published, only controlled by the given flags.

    I've looked at two strategies:

    Copy on save:

    Have a "Master content"-tree and create additional content trees for each site by hooking into the Save and publish workflow in the "Master content"-tree" and copy the content to the sites where it should be visible.

    I would although assume that this approach would lead to a lot of bookkeeping in order to also copy content that are connected to the published item, such as the relations-API, attached binaries etc.

    Virtual sites:

    Have a "Master content"-tree for all content and create "virtual" sites which basically just holds a configuration that identifies which site it is. This configuration is used in all templates or functions that aggregate content in order to filter out non-relevant content for that site

    The "Virtual site" approach seems like the best option at the moment. It seems similar to the concept Umbreco has of connecting a language setting to multiple domains. Is it possible to use some of the same mechanisms in my case? 

    Any other suggestions/advice are also welcomed.

    Thanks.

    samyhrer

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 17, 2014 @ 18:40
    Jan Skovgaard
    0

    Hi Samyhrer

    Are all the sites based on the same language? And should the content of the sites be 1-1 or can they vary content-wise? Do the sites share the same styling and functionality?

    At a first sight I would suggest having 3 site root nodes and then a shared content repository like

    - Content

     - Homepage 1

     - Homepage 2

     - Homepage 3

     - Shared content repository

        - Content element 1

        - Content element 2

        - Content elemnt 3

        - Etc.

    You can of course also add folders to make it easier to organize the shared content elements.

    But looking forward to learning more about your sites so a more detailed answer can be posted :)

    Cheers,

    Jan

  • samyhrer 4 posts 24 karma points
    Dec 18, 2014 @ 09:54
    samyhrer
    0

    Thanks for your reply.

    Each site will actually be presented in two languages, norwegian and english. It is mostly about translating labels in the templates, but also some of the textual content. For the translation of the textual content I've looked at the Vorto extension (http://our.umbraco.org/projects/backoffice-extensions/vorto/) which seem to fit the requirements.

    Functionality, styling and templates will be shared among the sites, but they will each need to be branded differently in terms of color palette, banner pictures etc. I've concluded that this is easily accomplished in Umbraco and is a matter of adding different "branding/theme"-stylesheets for each site.

    Your suggestion about 3 site root nodes and a shared content repository seems like a good fit. But what mechanisms can I use in Umbraco in order to traverse and display content from the Shared Content Reposity? For instance, if i want the user to access http://homepage1.com/Content element 1 within the context and branding of Homepage1. Is it about rewrite rules, or can I somehow tap into the content traversal mechanisms of Umbraco to accomplish this? Or any other options available in the platform for that matter.

    .samyhrer

  • samyhrer 4 posts 24 karma points
    Dec 18, 2014 @ 10:34
    samyhrer
    0

    Maybe I could accomplish what I want by tapping into the request pipeline http://our.umbraco.org/documentation/reference/request-pipeline/

    Suggestions are still welcome :)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Dec 18, 2014 @ 15:09
    Jan Skovgaard
    0

    Hi Samyhrer

    Ok, bases on that information I think you should go with my initial suggestion. In order to be able to translate labels, button texts etc. you can use dictionary items, which are currently placed in the "Settings" section.

    You can learn more about using dictionary items here http://24days.in/umbraco/2013/the-dictionary-secrets/

    In regards to shared content - If the content pieces are in different languages then they should only be able to be resued throught a language site. Otherwise you will be facing issues unless you make use of the Vorto package on your shared content elements and make a tab for each language (Which is also a viable option - But less flexible if the client decides to enter a market in yet another Country). So I think that the structure should rather be like

    English

     - Homepage (Configure hostname here)

     - Shared Content

     

    Norwegan

     - Homepage (Configure hostname here)

     - Shared Content

    If then you have something that should for some reason be shared globally then you could add a "Global content" repository at the root level like this

    English

     - Homepage (Configure hostname here)

     - Shared Content

     

    Norwegan

     - Homepage (Configure hostname here)

     - Shared Content

    Global Content

     - Element 1

     - Element 2

     - Etc.

    If you share global content between the sites the branding, styling and colours can easily be managed to fit in the branding of the site where the content element is selected.

    If you make sure to add a site specific class in your <html> element for instance you can easily override the visuals for the elements depending on, which site they're being displayed on.

    So say you have a box with a header field, teaser field and rich text field you might have some basic general styling that applies, which could look something like this

    .box{

      background: #ff2222;

      width:220px;

    }

    .box .header{

      color: green;

      font-size: 20px;

    }

    Then you can change the styling making a more specific selector using the sitewide class from the <html> element.

    .my-english-site .box{

      background: #22ffff;

    }

    .my-norwegian-site .box{

      background: #fff;

    }

    So you could consider making a general css file, which deals with layout, font sizes etc. and then create two seperate brand stylesheets, which deal with backgrounds, colors etc. and then only include those where they are needed.

    I hope the above makes sense and that it's useful to you.

    /Jan

  • Tom 713 posts 954 karma points
    Oct 12, 2015 @ 03:51
    Tom
    0

    Hi Jan How does that work with linking.

    I'm trying to do

    • Root 1
    • Root 2
    • Shared Content

    And anything that links to something coming out of shared content gets the right host name but returns a 404?

  • koszar 1 post 71 karma points
    Jun 26, 2016 @ 21:52
    koszar
    0

    Hi,

    I have the same problem. Maybe someone have solution?

    1. Root1
    2. Root2
    3. Shared content

    When I try to open shared content from root 1 position I have 404 error

Please Sign in or register to post replies

Write your reply to:

Draft