Copied to clipboard

Flag this post as spam?

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


  • dominik 711 posts 733 karma points
    Jan 21, 2011 @ 10:23
    dominik
    0

    translation - stay on current page

    Hello,

    I used the dropdown language selector and it works great.

    But even if i change the language i am redirected to the root page.

    It is neccessary that the user stays on the current page.

    How can i get this working?

    In other CMS (Typo3) there are stored some UIDs for each site and this are connected togehter because the site name can be changed.

    So how can i relate pages (this is possible in umbraco) and use the change language dropdown to connect to the related site?

     

    Thanks for help

  • Michael Latouche 504 posts 819 karma points MVP 4x c-trib
    Jan 21, 2011 @ 10:52
    Michael Latouche
    0

    Hi Dominik,

    Maybe you can heva a look at the current post: http://our.umbraco.org/forum/developers/api-questions/10603-How-to-relate-pages-in-a-multi-language-site

    I think it contains the information you need about relating multi-lang docs to one another.

    Cheers,

    Michael.

  • dominik 711 posts 733 karma points
    Jan 21, 2011 @ 10:56
    dominik
    0

    ok i found a working solution for connecting parent to child.

    Now i need the same way to connect child back to parent

    Here is the xslt

      <xsl:variable name="relations" select="umbraco.library:GetRelatedNodesAsXml($currentPage/@id)//relation [@parentId = $currentPage/@id]"/>

    <ul>
    <li class="header">Alternative languages</li>
    <xsl:for-each select="$relations">

            <xsl:variable name="url" select="umbraco.library:NiceUrl(@childId)" />
            
            <xsl:if test="$url != ''">
            <li><a href="{$url}"><xsl:value-of select="./node/@nodeName" /></a></li>
            </xsl:if>

    </xsl:for-each>
    </ul>
Please Sign in or register to post replies

Write your reply to:

Draft