I just noticed my example was slightly wrong, it should be AnotherPageType.aspx.
But anyway...Umbraco URL Alias or Umbraco URL Name only change the last part of the url, the filename.It's the bit before I want to change.
I also don't think the rewriting will do exactly what we want as we want any links on the site to show the shorter URL instead of just rewriting it when the page is visited.
UmbracoUrlAlias can be used to remove sections of the path - if you were to add the property to your doctype, then alias AnotherPageType.aspx as 'Page/AnotherPageType', it will then be accessible at that URL.
Then when you're building out navigation etc and need to include the url for the node, instead of node.NiceUrl or node.Url, use node.umbracoUrlAlias.
Removing "folders" from link
In several of our sites we want pages to be organised under container or summary document types but don't want these to appear in the page link.
For example
Home
-- Page
---- Another Page Type Summary
------- Another Page Type
In the above the Url for Another Page Type would be built like
however we would like to be able to change these to remove AnotherPageTypeSummary so the Url would become
"Another Page Type Summary" is needed for navigation and structure so removing it isn't really an option.
Is there a way to customise the path as well as the Url Name for a page.
Could you not use Umbraco URL Alias or Umbraco URL Name? Or do you mean the breadcrumb path?
S
Hi,
Am looking to achieve the same results but without any success. Here is what ive been trying, may be that could help you.
add this to the /config/UrlRewriting.config
I just noticed my example was slightly wrong, it should be AnotherPageType.aspx.
But anyway...Umbraco URL Alias or Umbraco URL Name only change the last part of the url, the filename. It's the bit before I want to change.
I also don't think the rewriting will do exactly what we want as we want any links on the site to show the shorter URL instead of just rewriting it when the page is visited.
Hi Suzy
UmbracoUrlAlias can be used to remove sections of the path - if you were to add the property to your doctype, then alias AnotherPageType.aspx as 'Page/AnotherPageType', it will then be accessible at that URL.
Then when you're building out navigation etc and need to include the url for the node, instead of node.NiceUrl or node.Url, use node.umbracoUrlAlias.
Should do exactly what you're looking for.
cheers
Nathan
is working on a reply...
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.