Copied to clipboard

Flag this post as spam?

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


  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 19, 2013 @ 16:05
    Rasmus Fjord
    0

    Is it possible to "mirror"/duplicate/display content to an area ?

    Hey 

    This might have been answered a thousend times but i cannot find a good solution to this. Instead of trying to explain the issue ill write the scenario where we need it. 

    -----------

    We are soon going to launch a medium-large site with about 10-14 languages upon, variying from US to Japanese.

    But the site is only going to contain news in english, but displayed on all languages, and this is the issue.

    The structure is like this ATM : 

    ---------------------------

    -- EN

    -- -- News

    -- -- -- Awesome newsitem

    -- -- -- Awesome newsitem about rockets

    -- -- -- Awesome newsitem about 

    -- JP

    -- -- News

    ---------------------------

    So under the JP/News node the news from EN/News should live and work with urls and everything. The reason that we cannot just link to EN/News is that the JP visitors will suddenly see EN menus and such, so the news must be displayed upon the JP/News with the nodes being generated.

    Help me obi one kanobi your my only hope :)

  • Daniel Williams 16 posts 38 karma points
    Mar 20, 2013 @ 08:33
    Daniel Williams
    0

    1) Can't you either put the news on a new langugage layer, which has a different URL, and then link to that language with a parameter of which country they came from?

    http://news.example.com/news-1.aspx

    2) Or, you can maybe use the related feature in Umbraco, however this might make duplicated content with Google..

    Remember to use HREFlang if you do the second approach.

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 20, 2013 @ 08:44
    Rasmus Fjord
    0

    Hey Daniel :) 

    Thx for throwing a bone here. 

    1. Seperate Language layer

    My question is can this be done ? Because i dont know of a feature where i can overrule the "language" set on nodes(hostnames!) trough either API or query param. Also the issue with this one is that the user is leaving their actual content space. 

    2. "Related"

    DC is no problem, HREFlang and canonical is your savior here, but since ive never worked with related im a bit on rock bottom. Because to my knowlagde on related it needs another node to relate to ? ill go check out related at once.

  • Daniel Williams 16 posts 38 karma points
    Mar 20, 2013 @ 08:47
    Daniel Williams
    0

    1) I believe it can be done - however, i don't know what you mean about overruling? 

  • Stephen 767 posts 2273 karma points c-trib
    Mar 20, 2013 @ 08:59
    Stephen
    101

    Just to make sure I understand, you want both

    • /en/news/awsome-news
    • /jp/news/awsome-news

    To be valid urls and display the same news item, but the first one in an english culture (for menus, etc) and the second one in a japanese culture?

    About "overruling", can you just try to change the current thread UI culture? I believe that's what's used internally for figuring out the culture.

    Idea:

    • Create page /jp/news/catch-all
    • Create rewriting rule /jp/news/anything => /jp/news/catch-all?path=anything
    • The template for catch-all page gets the node with url /en/news + path eg /en/news/anything
    • And uses that node in place of "model" (dunno if you're XSLT or Razor)

    So, you're rendering within the japan space... though you have to be careful to use the real Model to navigate to parents (for menus...) and the substitute Model to get the actual news item properties.

    Am I making sense?

    Stephan

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 20, 2013 @ 09:01
    Rasmus Fjord
    0

    Arh sry :) 

    Ill try to explain, 

    Lets say all our news are written under the EN node where the language of the node/hostname is set to English. So on this page all dictionary items is translated correct to english and its the correct navigation we are seeing.

    On the JP node we have of course set the language of the node/hostname to Japanese so the users will see all the correct dictionary items. So when the user goes to the japanese news section they will be sent off to another language location where suddenly the menus/dictionary items are different. 

    Hope you understand 

  • Daniel Williams 16 posts 38 karma points
    Mar 20, 2013 @ 09:04
    Daniel Williams
    0

    Well, you can do it in two ways.

    1) On the language layers, you can maybe collect the content with AJAX.

    2) Send a querystring parameter with your news.example.com/?lang=en
    - Which then dynamicly changes all the dictonary items, if it is possible :) 

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 20, 2013 @ 09:07
    Rasmus Fjord
    0

    Hey Stephan  :)

    Its exactly what i want to do, and that seems like a workable solution. 

    Thx a ton, ill get right on a workable edition of it.

    Also a big thx to you Daniel

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Mar 20, 2013 @ 09:10
  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 20, 2013 @ 09:16
    Rasmus Fjord
    0

    Thx Jeroen

  • Stephen 767 posts 2273 karma points c-trib
    Mar 20, 2013 @ 09:20
    Stephen
    0

    @Rasmus: tell us whether it works!

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 20, 2013 @ 09:34
    Rasmus Fjord
    0

    Ill give it shout when i have a working copy

  • Rasmus Fjord 675 posts 1566 karma points c-trib
    Mar 20, 2013 @ 13:09
    Rasmus Fjord
    1

    And presto your solution Stephen has been implemented :)

    on my "japanese"(in this case danish) site i have a node named "news" with a childnode called "link". On the link node is just a simple nodepicker thats pointing to which "news" we want to inherit from.

    For handling the urls on the news ive done a urlrewrite like this :

     

     <add name="NEWS-DA" virtualUrl="^~/da/news/(.*)" destinationUrl="~/da/news/link.aspx?news=$1" rewriteUrlParameter="ExcludeFromClientQueryString" ignoreCase="true" />

       To handle the url ive just done a good old string split like this :

     

    Url = Url.Replace(Url.Split('/').Last(),"");

    Url starts out as the this "/da/news/link.aspx". We remove "link.aspx" to make room for the actually news name in the url. 

    Then when we are building our actual url I just do this :

    @(Url+ Item.Url.Split('/').Last())

    On the actual newspage(Link.aspx) that is supposed to display the news I make a quick lambda expression to fetch the actual newsitem by looking up its url like this :

      var NewsItem = News.First(c => c.NiceUrl == Url);

    Where "News" is a List<DynamicNode> containing all newsposts from the EN site.

     

    THX to all who contributed.

Please Sign in or register to post replies

Write your reply to:

Draft