Anyone knows how to implement something like the Umbraco Forums topics URLs.
as you can see below, Umbraco Forum adds node ID as a prefix to the URL.
I've read before, that this can be done by UmbracoUrlName, where you can customize a URL, but I need it dynamically, without the need to edit a node each time.
You can plugin your own logic to how a Url is generated in Umbraco for a particular type of page, you can do this by creating a custom UrlProvider and ContentFinder, to specify the rules for generating the Url and then mapping that incoming Url to the content.
But you can also customise the logic that generates a particular 'segment' of a url - by creating a custom UrlSegmentProvider... there is an example in the documentation of adding a 'product id sku' to the segment of the Url - see here:
We have dealt with this issue by creating an UmbracoURLName property, and we've set an event on nodes creation, so we fill UmbracoURLName with the updated URL each time a node gets created. But I think your solutions makes more sense and reliable, we will check it and apply it. Thanks Marc!
I need assistance, I am facing an issue with secondary language, In my case English is working fine but secondary language Danish is not working as shown below. I've added domain from Culture and Hostnames. For English https://localhost:4865 (working fine), For Danish language https://localhost:4865/dk (getting following error)
English is working fine as default language
Danish is not working, getting 404 error as shown above
How to add node ID to a node's URL dynamically
Hello,
Anyone knows how to implement something like the Umbraco Forums topics URLs.
as you can see below, Umbraco Forum adds node ID as a prefix to the URL.
I've read before, that this can be done by UmbracoUrlName, where you can customize a URL, but I need it dynamically, without the need to edit a node each time.
Hi Saif
You can plugin your own logic to how a Url is generated in Umbraco for a particular type of page, you can do this by creating a custom UrlProvider and ContentFinder, to specify the rules for generating the Url and then mapping that incoming Url to the content.
But you can also customise the logic that generates a particular 'segment' of a url - by creating a custom UrlSegmentProvider... there is an example in the documentation of adding a 'product id sku' to the segment of the Url - see here:
https://our.umbraco.com/Documentation/Reference/Routing/Request-Pipeline/outbound-pipeline#example
That might be relevant to what you are trying to achieve.
regards
Marc
We have dealt with this issue by creating an UmbracoURLName property, and we've set an event on nodes creation, so we fill UmbracoURLName with the updated URL each time a node gets created. But I think your solutions makes more sense and reliable, we will check it and apply it. Thanks Marc!
This great documentation https://our.umbraco.com/Documentation/Reference/Routing/Request-Pipeline/outbound-pipeline#example helped us in generating a particular segment, Thanks Marc.
Dear Saif,
I need assistance, I am facing an issue with secondary language, In my case English is working fine but secondary language Danish is not working as shown below. I've added domain from Culture and Hostnames. For English https://localhost:4865 (working fine), For Danish language https://localhost:4865/dk (getting following error)
English is working fine as default language
Danish is not working, getting 404 error as shown above
Plz assist
is working on a reply...