cofoundry
cofoundry copied to clipboard
Parameter in non custom entity page route
Hi,
I want to know if we can create pages that can get a parameter from route without query string.
For example, we want to create a page that can pass a Id ( /page/{id} ).
We know that it is possible for custom entity page, but is it possible for an other type of page?
If we try to add when create a page, this error is showed.
Can you help me please?
Thanks!
No, you'd have to use regular MVC controllers and forgo content management on the page.
I take it you want to just ignore the parameter as you'll deal with it in the page logic somewhere and you want to have visual editor editing of content in the page, which would be the same content irrespective of the '{id}' value?
Hi, yes we want to redirect to same page to show the same content and get the url parameters in View.
Thanks.
There's a few ways that this could be resolved:
- Allowing parameters in dynamic routes and surfacing them somehow in the viewmodel
- Detaching the pages/visual editor so that it would be used from a plain MVC route
I think (2) would be a more flexible way of solving this and a few other scenarios, and it's something we'd like to have available for SPA pages too.