Replies: 1 comment 4 replies
|
You can configure routes in your module startup see demo module https://github.com/OrchardCMS/OrchardCore/blob/dev/src/OrchardCore.Modules/OrchardCore.Demo/Startup.cs |
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
I understand that for Orchard Core project modules the default route can be referenced by the project name as the "area," however I was wondering if an alias could be created or if it can be changed to a friendlier name. Project names are often long and awkward. It would be nice if the module libraries and static files could map to this alias.
For the standard asp.net core files this seems to be a good option added to the startup.cs of the module library:
services.Configure<RazorPagesOptions>(options => { options.Conventions.AddAreaFolderRoute("Module.Name", "/", "friendly"); });However, this doesn't work for the static files. Is there an Orchard Core implementation that provides the file contents of the application's module static view files. I suspect something like this in the startup.cs:
app.UseStaticFiles(new StaticFileOptions() { FileProvider = "An orchard core implementation with access to the static files", RequestPath = new PathString("/friendly") });Any guidance or resources would be appreciated.
All reactions