Use umbracoUrlName and remove any parent nodes from the url?
I'm using umbracoUrlName to specify the URL of a page, but the URL still includes the parent node. Eg this is the original URL structure:
domain.com/parent/page
I want to achieve this...
domain.com/page-with-new-url
but this is what happens...
domain.com/parent/page-with-new-url
I can't use the umbracoHideTopLevelNodeFromPath web.config setting because I have other pages in the site that need the parent node info in the URL. Has anybody got any ideas?
IMO, umbracoUrlName should not to be used to build navigation/url structures. Rather, a visitor should be able to enter the path domain.com/page-with-new-url and be 'redirected' to the domain.com/parent/page. It's a visitor's feature, not a development feature!
You could still do it though, using concatenation of a few string such as http_host, a slash and the value of the umbracoUrlName property. But be aware that the umbracoUrlName property value can hold multiple values (comma separated)
Thanks Dirk, unfortunately its for SEO purposes (specified by an external SEO consultant) so having a redirect wouldn't really help the situation. Its all about having a link with the url containing the relevant keyword(s). Not sure what you mean by using concatenation - where and how would I implement that?
Use umbracoUrlName and remove any parent nodes from the url?
I'm using umbracoUrlName to specify the URL of a page, but the URL still includes the parent node. Eg this is the original URL structure:
domain.com/parent/page
I want to achieve this...
domain.com/page-with-new-url
but this is what happens...
domain.com/parent/page-with-new-url
I can't use the umbracoHideTopLevelNodeFromPath web.config setting because I have other pages in the site that need the parent node info in the URL. Has anybody got any ideas?
Hi jonok,
IMO, umbracoUrlName should not to be used to build navigation/url structures. Rather, a visitor should be able to enter the path domain.com/page-with-new-url and be 'redirected' to the domain.com/parent/page. It's a visitor's feature, not a development feature!
You could still do it though, using concatenation of a few string such as http_host, a slash and the value of the umbracoUrlName property. But be aware that the umbracoUrlName property value can hold multiple values (comma separated)
Cheers,
/Dirk
Thanks Dirk, unfortunately its for SEO purposes (specified by an external SEO consultant) so having a redirect wouldn't really help the situation. Its all about having a link with the url containing the relevant keyword(s). Not sure what you mean by using concatenation - where and how would I implement that?
Can you not use canonical urls for this?
is working on a reply...