Reputation: 41
The current default Blazor server side app has _Host.chstml file on Pages folder. If I dont want to use Pages folder but instead use multiple folders for different sub folders, can I have multiple _Host.chstml file as well?
Upvotes: 3
Views: 2033
Reputation: 45704
You don't have to have multiple _Host files. Instead you can create multiple featured sub-folders. See here how to do it: How to use subfolders in the Pages and Shared folders
You can also define multiple layout components in the Shared folder, for each of your featured sub-folder. Note that in each of these folders there should be an _Imports.razor file with a @layout directive and the name of a custom layout component...Currently, the Pages folder contains an Imports.razor file with a @layout directive set to MainLayout: @layout MainLayout
Place your CSS files in the the wwwroot folder.
Hope this helps..
Upvotes: 3