Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change URL names in Umbraco

This is my first time round using Umbraco and I have created Document Types / Pages using the wrong naming format and now this has transpired into my page URL's, for instance /about-page/. How would I go about changing them to /about as I have searched the back-end admin panel and there dose't seem to be an option to change their link to document values.

Would anyone be able to provide a simple code based example using umbracoUrlAlias or umbracoUrlName how I could change this preferably in Razor.

Thanks

like image 408
rtn Avatar asked Jul 30 '14 09:07

rtn


3 Answers

Editing @run yards Solution by digbyswift help in comment

Correct Solution:

  1. Create Property on in Document Types which applies to all pages you want to change the URL
  2. Call the name anything you want e.g Page URL and Possibly give it a new tab.
  3. Call the alias umbracoUrlName
  4. Type as text sting
  5. Should not be Mandatory (As when you start replacing .Url with .umbracoUrlAlias within the views it will need to be present)
  6. Tab as Generic
  7. Click Save on top right on the page

Added screenshot for starter kit on Umbraco v7.2.5 Adding screenshot for starter kit on Umbraco v7.2.5

like image 119
c0demaster Avatar answered Oct 23 '22 14:10

c0demaster


Unless I'm very much misunderstanding your issue, you should just be able to change the name of your page and republish. This doesn't need an additional field, just change the value in the "Properties" tab and republish the page. This will automatically change the URL of the page.

like image 31
Digbyswift Avatar answered Oct 23 '22 14:10

Digbyswift


You can also create a property called umbracoUrlName using a TextString property editor. If this has a value then it will generate the URL fragment for the page using this value, rather than the page name. This changes the URL for the page, rather than creating an alias, like umbracoUrlAlias.

like image 33
Dan Diplo Avatar answered Oct 23 '22 13:10

Dan Diplo