How to restrucure URLs to omit some parent folders
Hi,
I am looking to restructure the URLs of some pages without having to restructure where the content is in Umbraco.
Example.
Services > Insurance > Home Insurance
=
services/insurance/home-insurance
How can it be displayed as this /insurance/ and /home-insurance/
I know there would be an issue with duplicates but I am certain there will be no duplicates. I also do not need to apply this restructuring to all pages just select, high-level pages.
Sorry but I do not understand your question, specifically this line "How can it be displayed as this /insurance/ and /home-insurance/" what do you mean by "it"
It might help to post a picture of your content tree.
Thanks for getting back to me so quickly. By it I mean the URL.
I basically want to hide certain parts of the tree from the URL that is generated for a page.
In the example I gave "services/insurance/home-insurance" I want to be able to hide "services/insurance/" and only display "/home-insurance/" in the URL.
I'll give a full URL as reference.
Current URL: www.acmeinsurance.com/services/insurance/home-insurance
Desired URL: www.acmeinsurance.com/home-insurance
The page has not moved in the content tree but "services/insurance/" is hidden.
You should look into the special umbracoInternalRedirectId property - If you create a simple Alias DocumentType with a property named umbracoInternalRedirectId, you can create a document at the desired URL (e.g. /home-insurance) which simply loads the other page internally with no redirection.
The tricky part is that you'll need to use the Alias page's id when building navigations and links etc., which can be tricky (if you really don't want people to land on the expanded URLs).
If you just need to be able to supply the short URL for marketing purposes, consider using the umbracoUrlAlias property instead (on the real content node) - this will allow you to have multiple aliases (home-insurance, homeinsurance etc.) or the same content - but the URL will be the "long" Umbraco URL.
How to restrucure URLs to omit some parent folders
Hi,
I am looking to restructure the URLs of some pages without having to restructure where the content is in Umbraco.
Example.
Services > Insurance > Home Insurance
=
services/insurance/home-insurance
How can it be displayed as this /insurance/ and /home-insurance/
I know there would be an issue with duplicates but I am certain there will be no duplicates. I also do not need to apply this restructuring to all pages just select, high-level pages.
All thoughts welcome.
Thanks,
Hey Tom,
Welcome to the forum!
Sorry but I do not understand your question, specifically this line "How can it be displayed as this /insurance/ and /home-insurance/" what do you mean by "it"
It might help to post a picture of your content tree.
Rich
Hi Rich,
Thanks for getting back to me so quickly. By it I mean the URL.
I basically want to hide certain parts of the tree from the URL that is generated for a page.
In the example I gave "services/insurance/home-insurance" I want to be able to hide "services/insurance/" and only display "/home-insurance/" in the URL.
I'll give a full URL as reference.
Current URL: www.acmeinsurance.com/services/insurance/home-insurance
Desired URL: www.acmeinsurance.com/home-insurance
The page has not moved in the content tree but "services/insurance/" is hidden.
Thanks,
Tom
Hey Tom,
On your DocType for /insurance add a property called "umbracoUrlAlias" of type TextString
Have a look here http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbracourlalias
Rich
Hi Tom,
You should look into the special umbracoInternalRedirectId property - If you create a simple Alias DocumentType with a property named umbracoInternalRedirectId, you can create a document at the desired URL (e.g. /home-insurance) which simply loads the other page internally with no redirection.
The tricky part is that you'll need to use the Alias page's id when building navigations and links etc., which can be tricky (if you really don't want people to land on the expanded URLs).
If you just need to be able to supply the short URL for marketing purposes, consider using the umbracoUrlAlias property instead (on the real content node) - this will allow you to have multiple aliases (home-insurance, homeinsurance etc.) or the same content - but the URL will be the "long" Umbraco URL.
/Chriztian
Thanks both for your suggestions. I'll look into these and let you know how it goes.
Tom
is working on a reply...