Open Closed

How to set layout options #9926


User avatar
0
tony.gayter created

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)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    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:

    1. 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);
       });
    
    1. Set Boxed Layout
      For MVC:
    Configure<LeptonXThemeMvcOptions>(options =>
       {
           options.ApplicationLayout = LeptonXMvcLayouts.Boxed;
       });
    

    For Blazor:

    Configure<LeptonXThemeBlazorOptions>(options =>
       {
           options.Layout = LeptonXBlazorLayouts.Boxed;
       });
    

    Replace TopMenu with Boxed to use the boxed layout.

    1. 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.

    2. 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.

  • User Avatar
    0
    tony.gayter created

    LeptonXBlazorLayouts.Boxed doesnt exist!

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    What is your UI type and abp&leptonx package version?

    Thanks,

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 23, 2025, 10:47