Copied to clipboard

Flag this post as spam?

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


  • Sherry Ann Hernandez 320 posts 344 karma points
    Feb 07, 2011 @ 14:58
    Sherry Ann Hernandez
    0

    multilingual nice url in usercontrol

    I use the dictionary object to set the property node id for each language

    In my user control I use this

    int

     

     

    rowCtr = Convert.ToInt32(umbraco.library.GetDictionaryItem("hotel home node"));

    GetPropertyFromAliasAndNodeID(

     

    "umbracoUrlAlias", rowCtr)

    to get the node id dynamically for each language/culture.

    I setup also the <add key="umbracoHideTopLevelNodeFromPath" value="false" /> in the web.config.

    My problem is the  GetPropertyFromAliasAndNodeID("umbracoUrlAlias", rowCtr) is not including the toplevel folder which is in my case the language code.

    How can I use the umbracoUrlAlias to include the top level folder?

     

     

  • Michael Latouche 502 posts 816 karma points c-trib
    Feb 07, 2011 @ 16:37
    Michael Latouche
    0

    Hi Sherry Ann,

    Did you try seting

    <useDomainPrefixes>true</useDomainPrefixes>

    in your umbraco.config file?

    Cheers,

    Michael.

  • David Verberckmoes 46 posts 77 karma points
    Feb 07, 2011 @ 16:38
    David Verberckmoes
    0

    Hi,

    I think you just need the umbraco.library.NiceUrl() function. This returns the URL of the requested NodeId.

    Or am I misunderstanding something here?

    Rgds,

    David#

  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    Feb 07, 2011 @ 16:40
    Biagio Paruolo
    0

    What's <useDomainPrefixes>true</useDomainPrefixes> ?

  • Michael Latouche 502 posts 816 karma points c-trib
    Feb 07, 2011 @ 16:48
    Michael Latouche
    0

    @Biagio: you need to set this to ensure that urls are unique when runnning with multiple root nodes.

    Cheers,

    Michael.

  • Biagio Paruolo 1494 posts 1635 karma points c-trib
    Feb 07, 2011 @ 16:54
    Biagio Paruolo
    0

    So, it's a good thing in Umbraco Multisite installation.

    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