Copied to clipboard

Flag this post as spam?

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


  • Andreas Pfanner 196 posts 314 karma points
    Jan 26, 2011 @ 10:51
    Andreas Pfanner
    0

    Multilingual Site - Homepage Links

    Hello,

    I have a multilingual site running with the following folder structure (no sub domains):

    Content
    - Site
    -- de
    -- en

    On properties for the german homepage (de), there is the following:

    Link to document
    Alternative Links
    -

    Using XSLTSearch or other packages for XML Sitemap generation, the link to the german homepage is always generated as "/de.aspx" (using umbraco.library:NiceUrl()), but I don't want to use them for the home pages. I would like to get "/de" or "/en" instead in case of the home pages (without changing each packages XSLT file). Is it possible to achieve that? Is there a way to get the Alternative Link from NiceUrl() method for specific pages?


    Best Regards

    Andreas Pfanner

  • Magnus Eriksson 122 posts 362 karma points
    Jan 26, 2011 @ 11:01
    Magnus Eriksson
    0

    If you set

    <add key="umbracoUseDirectoryUrls" value="true" />

    you will get the URLs without the file extension (you will need to configure wildcardmapping in IIS though).

    Regards,
    Magnus

  • Andreas Pfanner 196 posts 314 karma points
    Jan 26, 2011 @ 11:12
    Andreas Pfanner
    0

    Hi Magnus,

    the problem here is that I don't want directory urls for all of the sub pages, but only for the home pages.. Any chance?

     

    Best Regards,
    Andreas

  • Sjors Pals 617 posts 270 karma points
    Jan 26, 2011 @ 11:21
    Sjors Pals
    0

    You can adjust the script a little bit ie by checking @level=1 and check what node it is, and put a rewrite rule in the UrlRewriting.config , i think that should work.

  • Magnus Eriksson 122 posts 362 karma points
    Jan 26, 2011 @ 11:23
    Magnus Eriksson
    0

    Why wouldn't you want directory urls for all pages?

    I've not tested this, but something like this should work:

    <xsl:value-of select="substring-before(umbraco.library:NiceUrl(@id), '.aspx')" />

    Regards,
    Magnus

  • Andreas Pfanner 196 posts 314 karma points
    Jan 26, 2011 @ 11:29
    Andreas Pfanner
    0

    Its kinda cosmetic decision.. Is it preferred to use directory urls? I guess concerning SEO it should be no difference..

     

    Best Regards

    Andreas

  • Sjors Pals 617 posts 270 karma points
    Jan 26, 2011 @ 11:31
    Sjors Pals
    0

    For SEO reasons it has a slight advantage as far as i know.

  • Rasmus Berntsen 215 posts 253 karma points c-trib
    Jan 26, 2011 @ 11:37
    Rasmus Berntsen
    0

    Or you could try 4.6.1, looks like it has been fixed! My topnode returns "/" instead of CompanyName.aspx :)

    Edit: Ahhh didn't see the companyname.com/de, don't know if that works.

  • Andreas Pfanner 196 posts 314 karma points
    Jan 26, 2011 @ 11:40
    Andreas Pfanner
    0

    I already use 4.6.1, but I have multiple "top nodes" (for each language)..


    Best Regards

    Andreas

  • Sjors Pals 617 posts 270 karma points
    Jan 26, 2011 @ 11:44
    Sjors Pals
    0

    I don't think /de will work if you don't use niceurl's , i think it will result in a 404 error.

  • Andreas Pfanner 196 posts 314 karma points
    Jan 26, 2011 @ 15:45
    Andreas Pfanner
    0

    I decided to use directory URLs, now I'm fine! Thanks..

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies