Copied to clipboard

Flag this post as spam?

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


  • Raheel 62 posts 81 karma points
    Sep 15, 2010 @ 02:17
    Raheel
    0

    Separate property field for URL Page Name

    Hello guys...

    Currently, when you create a Page in umbraco it is given a "Name".

    - That same name is hown on the tree menu on Umbraco Administration (Eg: Our Products)
    - And that is the same name for the page url ( Eg: www.domainname.com/Our-Products.aspx )

    - I also have seen in the Page's Property that is has a ID assigned to it like 1078

    How can I add a property field so that that I can change the URL Page Name while leaving the page name that is displayed of Umbraco Nav Tree as default.

    So this is what I want to do:

    Under Properties tab while editing content... It shows

    Name: ___
    Created by: __

    etc etc

    I want to add new field saying:

    URL name: ____ (So if I type this to be ourservices it should show the URL as outservices.aspx)

    Thanks
    Raheel

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Sep 15, 2010 @ 09:45
    Matt Brailsford
    1

    Hi Raheel,

    This is actually really easy (when you know how). Umbraco has a few reserved property alias that do "special" things, one of which is umbracoUrlName. Basically, on your doc type, create a text string property with the alias umbracoUrlName, and whatever you enter in that field, will automatically be used for page name in the url.

    You can find out more about it here (plus links to the other reserved property alias linked on the right hand side)

    http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracourlname

    Hope this helps.

    Matt

  • Raheel 62 posts 81 karma points
    Sep 16, 2010 @ 01:16
    Raheel
    0

    Hey Matt,

    That is great! Thanks for that. I just tried it and it works.

    I wanted to know is there any list or a page where I can see the Reserved Property Alias available for Umbraco?

    Thanks
    Raheel

  • Raheel 62 posts 81 karma points
    Sep 16, 2010 @ 03:32
    Raheel
    0

    Its great that "umbracoUrlName" works!

    But - 

    On the navigation when I click on the link it still has the .ASPX extension at the end of the link.
    I am using the simple top level navigation that is on the packages.

    What and where do I change so the nav links only points to : domain.com/text    and NOT  domain.com/text.aspx

    Thanks
    Raheel

     

  • Raheel 62 posts 81 karma points
    Sep 16, 2010 @ 03:44
    Raheel
    0

    Did a bit of research and found the answer:

     

    You're looking for 'directory urls'... search the forum for lots of info and a few things to keep an eye out for. The web.config setting is:

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

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Sep 16, 2010 @ 09:27
    Matt Brailsford
    0

    Hi Rachel,

    You are correct, umbracoUseDirectoryUrls should do the trick.

    For a list of other reserved alias', just check out the links on the right hand side of the wiki page I posted earlier

    http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracourlname

    Many thanks

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft