There is an out of the box way to define a second URL where you may exlude the "Collection1". It is a simple config entry but I currently dunno where it is located :)
Right, I see what you mean, but if ultimately it's about what people see on the public facing site then niceUrl's shouldn't matter.
I suppose you could regular expression replace certain patterns on the niceUrl value as a string, then handle it's redirection using UrlRewites.
Also, depending on the umbraco version you're on, you should remove the aspx extentions using the umbracoUseDirectoryUrls key in the root web.config - this may help with the regEx pattern matching.
Exclude Document form NiceUrl
I want create document type for grouping content in backed (only for usability)
For example:
Now if I call NiceUrl for Product 1, a have url like this: /HomePage/Catalog/Collection1/Product1.aspx
How I can exclude Collection DocumentType form url, like thisL /HomePage/Catalog/Product1.aspx
Thanks!
Update:
In sources I find class NiceUrlProvider, how and where I can declare my custom NiceUrlProvider?
There is an out of the box way to define a second URL where you may exlude the "Collection1". It is a simple config entry but I currently dunno where it is located :)
Hi z4kk (nice name!)
Check out the "/config/UrlRewriting.config" file.
You can set rules to do exactly what you want. There's extensive docs referenced in the file to get you started.
Neil
Far as I know UrlRewriting.config not affected on NiceUrl. Or I'm mistaken?
Right, I see what you mean, but if ultimately it's about what people see on the public facing site then niceUrl's shouldn't matter.
I suppose you could regular expression replace certain patterns on the niceUrl value as a string, then handle it's redirection using UrlRewites.
Also, depending on the umbraco version you're on, you should remove the aspx extentions using the umbracoUseDirectoryUrls key in the root web.config - this may help with the regEx pattern matching.
Neil
is working on a reply...