How do I override the default layouts in ABP.IO
I am new to abp.io but not new to .net core. I am trying to figure out how to override the following files on my own main project: framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Applicartion.cshtml with my own cshtml
I tried to create a the following folders in my own project Themes/Basic/Layouts and put Account.cshtml and Application.cshtm in there, but they are not overriding the default files from the module.
I was able to override the css and js files from wwwroot, but nothing seems to work for the layouts files.
From my research I think I should be able to create a new Account.cshtml file in my main project and the virtual file system should pick it up but sadly it does not.
I don't want to create a theme from scratch and I don't want to have a maintain a fork of the basic theme if I don't have to.
Any suggestions would be greatly appreciated.
I am also new to ABP. I think I was able to change the theme by creating a new theme (inherit ITheme) similar to the BasicTheme in the source code. That allows you to use your. Then in the startup module (or your theme module) set the theme:
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpThemingOptions>(options =>
{
options.Themes.Add<MyTheme>();
if (options.DefaultThemeName == null)
{
options.DefaultThemeName = MyTheme.Name;
}
});
}
If your project is based on one of the CLI templates, then your startup module likely has a [DependsOn(typeof(AbpAspNetCoreMvcUiBasicThemeModule))] that will need to be removed. Then you may need to add [DependsOn(typeof(AbpAspNetCoreMvcUiThemeSharedModule), typeof(AbpAspNetCoreMvcUiMultiTenancyModule))]
I haven't had time to figure out how to define my own layouts, though. I think that would be more beneficial than being limited to the StandardLayouts.
One more thing that may be worth noting - I'm a little curious why the VirtualFileSystem didn't allow you to override the theme like you tried. It seems like that should have worked too. Did you try to override the those files in another project? If so, did you include the new files as embedded resources?
@rlavaud Please check out virtual file system. https://github.com/abpframework/abp/blob/dev/docs/en/Virtual-File-System.md#views--pages
@maliming Thank you for your reply but this is the first place that I have been. As I said before, I was able to get the virtual file system to override the files in wwwroot without any issues, but not the layout files in the Themes/basic/layout folder.
@LavenHook It seems that create a whole theme is the only approach I have so far. But like you said if we could override the existing layout or create new layout that would be great.
@rlavaud
see

I also have a similar issue with themes.
Can we use some form a guide on how to replace with another theme
@LavenHook Thank you so much! I was able to get it to work with your example. This is a lot clearer now. I assume that this only works with cshtml file and not cshtml.cs file correct? In other words if I wanted to override a razor page which has a model class from an existing module would that also work?
Thanks again for your help I greatly appreciate it.
@rlavaud see https://github.com/abpframework/abp/issues/2007#issuecomment-553803321
@maliming I think understand Use the virtual file system for the cshtml file and use the exposerservice technique to override an actual class.
This is very flexible.
Thank you so much