Copied to clipboard

Flag this post as spam?

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


  • Ahmed 16 posts 96 karma points
    Feb 04, 2014 @ 15:15
    Ahmed
    0

    using concat with niceurl

    hi,

    i have a UrlRewrite rule where i turn this "DomainName.com/en/sompage.aspx" to "DomainName.com/somepage.aspx?lang=en"

    so i have to write all urls to reference the desired language in the url (making anther sub domain is not an option)

    i tried to use concat

    concat( 'en', umbraco.library.NiceUrl($currentPage/@id))

    but i get this result instead "DomainName/en/en/somepage.aspx" 

  • Fuji Kusaka 2203 posts 4220 karma points
    Feb 04, 2014 @ 19:10
    Fuji Kusaka
    0

    Hi Ahmed,

    Here are some SEO packages that might help you

    http://our.umbraco.org/projects/website-utilities/seo-checker
    http://our.umbraco.org/projects/collaboration/babel-fish

    <xsl:variablename="languages"select="your.library:GetLanguages()"/>

    <xsl:iftest="count($languages/languages/language) &gt; 0">
       
    <xsl:for-eachselect="$languages/languages/language">
           
    <xsl:value-ofselect="concat(@name, ' [', @culture, ']')"/>
           
    <br/>
       
    </xsl:for-each>
    </xsl:if>

    http://our.umbraco.org/wiki/reference/code-snippets/getlanguages

    hope this helps
    //Fuji

     

     

  • Ahmed 16 posts 96 karma points
    Feb 09, 2014 @ 16:10
    Ahmed
    100

    i found the solution, i just had to add '/' before 'en' 

    like this concat( '/en', umbraco.library.NiceUrl($currentPage/@id))

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Feb 09, 2014 @ 19:26
    Fuji Kusaka
    0

    Got to know its working .

Please Sign in or register to post replies

Write your reply to:

Draft