Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 939 posts 2574 karma points
    Oct 12, 2010 @ 12:29
    Claushingebjerg
    0

    Reuse entire section in 2 language version

    Im building a site for a real estate company where i need to set up quite a lot of reference projects theyve done. Thats not a problem. The problem is, that the site is in 2 languages, and i REALLY dont want to create and maintain two parralel lists of project references.

    The Content on a Project reference is the same, only static text vary. These could be done with dictionary items.
    My problem is how to reuse the original list on the second language site, and make it "Realize" its reciding on another site, and thereby use the correct dictionary items...

    I dont really know where to start on this. Any pointers would be great

  • Rich Green 2246 posts 4008 karma points
    Oct 12, 2010 @ 13:00
    Rich Green
    0

    Hey,

    Off the top of my head, here are two ways you could do it.

    To answer your question about how you would know which site you were calling from, you could simply look at the current Home Node / Host Name in XSLT, something like

    <xsl:variable name="currentSiteRoot" select="$currentPage/ancestor-or-self::* [@isDoc]"/>

     

    With regards to where to hold the items, you could either:

    - Use Related Nodes

    -  Or hold the references outside of the site and pull them in via XSLT, like:

    - Site 1

    - Site 2

    - References

    Probably many other ways of doing it, hope I understood your question correctly.

    Rich

     

  • Rich Green 2246 posts 4008 karma points
    Oct 12, 2010 @ 13:06
    Rich Green
    0

    Thinking about it, if you use related nodes then the Dictionary items should already have language context.

    Rich

  • Claushingebjerg 939 posts 2574 karma points
    Oct 12, 2010 @ 13:06
    Claushingebjerg
    0

    I was actually thinking of doing the one you describe like:

    - Site 1

    - Site 2

    - References

    But how do i make this behave correctly when navigating to a specific reference. Example:

    - Site 1

    - Site 2

    - References
               - My House

    "My House" is not inside either Site1 or Site 2. So how would i make it so that when i choose a reference listed on site1 it stays within site1's scope, like

    - Site 1
       - References
          - My House

    Even though i physically resides outside of it.

    I hope i make sense...

     

     

     

     

  • Rich Green 2246 posts 4008 karma points
    Oct 12, 2010 @ 13:08
    Rich Green
    0

    I think related nodes might be the way to go to be honest.

    Rich

  • Claushingebjerg 939 posts 2574 karma points
    Oct 12, 2010 @ 13:10
    Claushingebjerg
    0

    Do you of any documentation how to use this

  • Rich Green 2246 posts 4008 karma points
    Oct 12, 2010 @ 13:15
    Rich Green
    0

    Hmm, couldn't find much but the Umbraco.tv ones are good if you have access to that?

    http://umbraco.org/documentation/videos/for-developers/relations/introduction-to-relations

    Rich


Please Sign in or register to post replies

Write your reply to:

Draft