p
Hi all, in umbraco 12. Anyone know if its possible to remove specific template types from the page url?
a
What do you mean with template types? For example you have /news/category/newsitem and you want to remove category from the pageurl?
j
You could potentially use a custom url provider for this in the outbound request pipeline https://docs.umbraco.com/umbraco-cms/reference/routing/request-pipeline/outbound-pipeline#custom-url-provider
In their example, the overriden GetUrl method should be what you are looking for - performing a check for the specific content type you want, and manipulating the URL to what you want it to be 👍
d
Unfortunately, just a custom URL provider is not enough. You would also need to implement a custom content finder and that is where the actual trouble starts, because now you need to traverse a significant portion of your content tree to check if your URL points to some content inside some other content.
3 Views