Im finding the documentation to be really lacking in a lot of areas which is a shame. Something as simple as showing/hiding things seems to either be missing or impossible to find.
I want to use the boxed layout, and the light style. Ive managed to force the light style like this, but I cant see any options to force boxed layout. I dont need it to be selectable in the app. not do i need any of the options drop down menus or the breadcrumb area but I seem to be forced to use them or have to figure out how to override templates. Surely there should just be an option to hide the bread crumb, or fix the layout?
private void ConfigureTheme()
{
Configure<LeptonXThemeOptions>(options =>
{
options.DefaultStyle = LeptonXStyleNames.Light;
options.Styles.Remove(LeptonXStyleNames.Dark);
options.Styles.Remove(LeptonXStyleNames.System);
options.Styles.Remove(LeptonXStyleNames.Dim);
});
Configure<LeptonXThemeMvcOptions>(options =>
{
options.ApplicationLayout = LeptonXMvcLayouts.TopMenu;
});
Configure<LeptonXThemeBlazorOptions>(options =>
{
options.Layout = LeptonXBlazorLayouts.TopMenu;
});
}
3 Answer(s)
-
0
To set the layout options for LeptonX in your ABP application, you are already on the right track with your configuration. Here’s how you can address your specific requirements:
- Force Light Style
You are correctly setting the default style to Light and removing the other styles:
Configure<LeptonXThemeOptions>(options => { options.DefaultStyle = LeptonXStyleNames.Light; options.Styles.Remove(LeptonXStyleNames.Dark); options.Styles.Remove(LeptonXStyleNames.System); options.Styles.Remove(LeptonXStyleNames.Dim); });
- Set Boxed Layout
For MVC:
Configure<LeptonXThemeMvcOptions>(options => { options.ApplicationLayout = LeptonXMvcLayouts.Boxed; });
For Blazor:
Configure<LeptonXThemeBlazorOptions>(options => { options.Layout = LeptonXBlazorLayouts.Boxed; });
Replace
TopMenu
withBoxed
to use the boxed layout.Hide Breadcrumbs
For Blazor, LeptonX renders its own breadcrumbs. To hide them, you need to override the Breadcrumbs component. See the official guide for overriding components:For MVC, you can override the relevant partial view or layout to remove the breadcrumb area.
Hide Options Dropdown Menus
If you want to remove the options dropdowns (such as style switchers), you will need to override the corresponding view/component in your project. There is currently no direct configuration option to hide these; overriding is the recommended approach.
Summary of Configuration:
private void ConfigureTheme() { Configure<LeptonXThemeOptions>(options => { options.DefaultStyle = LeptonXStyleNames.Light; options.Styles.Remove(LeptonXStyleNames.Dark); options.Styles.Remove(LeptonXStyleNames.System); options.Styles.Remove(LeptonXStyleNames.Dim); }); Configure<LeptonXThemeMvcOptions>(options => { options.ApplicationLayout = LeptonXMvcLayouts.Boxed; }); Configure<LeptonXThemeBlazorOptions>(options => { options.Layout = LeptonXBlazorLayouts.Boxed; }); }
To hide breadcrumbs and options menus, override the relevant components or views in your project.
Sources:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
- Force Light Style
-
0
LeptonXBlazorLayouts.Boxed doesnt exist!
-
0
hi
What is your UI type and abp&leptonx package version?
Thanks,