Join Discord
Powered by
Custom route hijacking, with parameter in route
# help-with-umbraco
i
Ian Houghton
08/01/2023, 3:48 PM
I'm trying to route a request to
https://localhost:44379/device/6e7caf6f-e2e2-4421-ba90-ef00b77521bd
, where "device" is an umbraco node in the tree with a template, and the Guid in the route is the Key of the device that I want to fetch data for, from an external source. I can get it working with custom route hijacking when I use this signature in my Render controller: [HttpGet] public IActionResult Index([FromQuery(Name = "key")] Guid key) but this doesn't work: public IActionResult Index([FromRoute] Guid key) I've tried this without success as well:
https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/implementation/custom-routing#custom-mvc-routes
Previous
Next