Copied to clipboard

Flag this post as spam?

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


  • Kal 13 posts 71 karma points
    May 27, 2014 @ 12:39
    Kal
    0

    NiceUrl does not contain folder in path

    Hi,

    I have a Umbraco structure like: Content/Folder/Pages

    I can access all the pages fine but on a url of /domain/page-name. I want to include the folder in the url like /domain/Folder/page-name. When I view the contents of NiceUrl it contains domain/page-name.

    Any idea what I'm doing wrong?

     

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 27, 2014 @ 12:50
    Jan Skovgaard
    0

    Hi Kal

    What version of Umbraco are you using?

    Usually the folder would be part of the url but can't remember if there has perhaps been a change so that document types without an assigned template is perhaps left out.

    Looking forward to hearing from you.

    /Jan

  • Kal 13 posts 71 karma points
    May 27, 2014 @ 12:58
    Kal
    0

    Hi Jan,

    I'm using Umbraco 6.2.0.

    Thanks.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    May 27, 2014 @ 13:16
    Jan Skovgaard
    0

    Hi Kal

    What does your code for grabbing the url look like?

    /Jan

  • Kal 13 posts 71 karma points
    May 27, 2014 @ 13:28
    Kal
    0

    Hi Jan,

    I've got a list for the node... 

    DynamicNode pageStart = Library.NodeById(1100);

    var pages = pageStart.GetChildrenAsList;

    and then access NiceUrl as pages[i].NiceUrl which gives me '/page-name/'. If I try browsing to '/folder/page-name' I get a 404.

    Thanks.

  • Mike Chambers 636 posts 1253 karma points c-trib
    May 27, 2014 @ 13:31
    Mike Chambers
    0

    in the web.config    <add key="umbracoHideTopLevelNodeFromPath" value="true" />

    Could this be the issue, that by default umbraco removes the top level node from the path?

  • Charles Afford 1163 posts 1709 karma points
    May 27, 2014 @ 13:46
    Charles Afford
    0

    Kai,

    What are you using as your folder structure?  Is it a package?

    When you say you cannot access it, what page appears when you try to navigate to it?

    "No template exsist..." ?

    Charlie :)

  • Kal 13 posts 71 karma points
    May 27, 2014 @ 13:51
    Kal
    0

    Hi Mike,

    Works now. I looked through those settings in web.config but didn't think that would have fixed it.

    Thanks for your help with this, much appreciated.

    Kal.

Please Sign in or register to post replies

Write your reply to:

Draft