Copied to clipboard

Flag this post as spam?

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


  • Carl Sargunar 69 posts 91 karma points MVP 4x
    Feb 10, 2010 @ 13:09
    Carl Sargunar
    0

    Running common content over multiple sites

    Hi All

    I'm trying to build a multisite CMS managed through one installation of Umbraco and what we need to achieve is this. I've got a multisite working through following wlakthroughs from this site and that looks great. However we need to get some common content that is shared with all sites and I want to see if there was an easyway to achieve this. my folder structure looks like the diagram below. The section in bold is what I'd like to achieve

     

    o Site1

    --o page 1.1

    --o page 1.2

    --o common page1

    --o common page2

    o Site 2

    --o page 2.1

    --o page 2.2

    --o common page1

    --o common page2

    o Common pages

    --o common page1

    --o common page2

     

    This is how I'd thought about achieving it and what I'll be doing, but as I was doing it I thought I'd post on here to gather thoughts on how I progress, and any hints or tips or pointers. I'll feedback my progress

     

    thanks

     

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Feb 10, 2010 @ 13:24
    Thomas Höhler
    1

    You can put all common content in an own root. Then you can use a contentPicker to select the nodes to show and via

    <xsl:value-of select="umbraco.library:GetXmlNodeById($currentPage/data [@alias='ALIASOFTHECONTENTPICKER'])/data [@alias='bodyText']" />

    I have made a complete shared content section for our new website with the tree multi picker

    hth, Thomas

  • Carl Sargunar 69 posts 91 karma points MVP 4x
    Feb 10, 2010 @ 19:25
    Carl Sargunar
    0

    Hi Thomas

    Thanks for the reply. I'm not sure I fully understand. I can't use that XSLT you show above as a content type. Could you please explain a bit more.

    I don't want to have to create anything on the sites which display the common content (site 1 and site 2 in the illustration above). I would ideally like something that I can create as part of the common site and then with properties, pick which child sites it should be shown in.If that is not possible, I would be interested in hearing how you achieve your common content section, but I'm quite new to this so all the detail you could provide would be appreciated

    I've tried myself and had very little success I must say

     

    thanks in advance

     

    Carl

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Feb 10, 2010 @ 23:21
    Thomas Höhler
    0

    First create a section where you can put in your common pages. guess you have an own document type called common with a generic property with alias bodyText as a Tiny MCE.

    Then you can create a document type called GetCommon with a generic property from type ContentPicker (alias = contentId). Then you can create two nodes below page 1.2 from document type GetCommon. there you can use the content picker to select the common pages. In the template you are using you can use the umbraco item with some inline xslt:

    <umbraco:Item runat="server" field="contentId" xslt="umbraco.library:GetXmlNodeById({0})/data [@alias = 'bodyText']" />

    hth, Thomas

     

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Feb 10, 2010 @ 23:22
    Thomas Höhler
    0

    Ahh, take a look into the wiki for the umbraco item documentation: http://our.umbraco.org/wiki/reference/templates/umbracoitem-element

  • Carl Sargunar 69 posts 91 karma points MVP 4x
    Feb 11, 2010 @ 12:36
    Carl Sargunar
    0

    Thanks Thomas - I'll look now. Thanks for your help

Please Sign in or register to post replies

Write your reply to:

Draft