Closed alberthajdu closed 4 months ago
Is HomeRoute support razor pages available?
Isn't it possible to set a Razor page as the HomeRoute? With a Recipe Step?
@jtkech how can we set a razor page with HomeRoute?
@alberthajdu what is options.Conventions.AuthorizePage("/test");
supposed to do?
Autoroute
map routes to content items and just provides a way to define an home route through settings. Then HomeRoute
is a concrete implementation that uses these settings to map the home route to a content item.
So we would need another feature to define an home page differently, or update Autoroute
to have additional options, and then another feature to map these settings to a razor page by updating the route values e.g with the page
specific value, the area value and so on, or update HomeRoute
to use these additional options.
That said we can already define a razor page as an home page by using @page "/"
Or through the following mvc helper as commented in the demo module
// This declaration would define an home page
//options.Conventions.AddAreaPageRoute("OrchardCore.Demo", "/Hello", "");
It seems that this issue didn't really move for quite a while. Is this something you'd like to revisit any time soon or should we close? Please reply.
Closing this issue because it has been stale for very long. If you think this is still relevant, feel free to reopen it.
Authorize
Recipes
HomeRoute should support razor pages.