Open Closed

Modify layout for my app #9997


User avatar
0
rbautista@ecosoft.com.mx created

Hello. How can I customize my application's layout?

I want a layout like the following:

In red, the main menu. In green, a submenu based on the selected main menu item. In blue, the actions that can be executed on the currently displayed page. Alternatively, is it possible for each page associated with the main menu to be displayed in a new folder, allowing for multiple folders in the application?


2 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent

    To achieve a layout similar to your screenshot (main menu on the left, submenu on top, and page actions), you need to customize your ABP application's layout. This is possible and supported, especially if you are using a theme like LeptonX.

    Here’s how you can proceed:

    1. Download the LeptonX Theme Source Code (if using LeptonX):
      • Use the ABP CLI to get the source:
    abp get-source Volo.Abp.LeptonXTheme
    
    • This will give you access to all layout files.
    1. Locate and Copy the Layout File:
      • Layout files are in:
    lepton\aspnet-core\volo\src\Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX\Themes\LeptonX\Layouts
    
    • For a side menu with a top submenu, you’ll likely want to start with SideMenuLayout.cshtml or TopMenuLayout.cshtml (depending on your base).
    1. Override the Layout in Your Project:
      • Copy the desired layout file into your own project, preserving the folder structure:
    /Themes/LeptonX/Layouts/Application/SideMenuLayout.cshtml
    
    • Modify this file to add a submenu (green area) and actions (blue area) as needed.
    1. Implement Submenu and Actions:

      • In your custom layout, add logic to render a submenu based on the selected main menu item.
      • You can use ABP’s menu system to define main and submenus, and render them accordingly.
      • For actions, you can define a section or component that displays context-specific actions for the current page.
    2. Optional: Organize Pages in Folders

      • You can organize your Razor Pages or MVC Views in folders corresponding to each main menu item.
      • Each folder can have its own set of pages and even its own layout if needed by setting the Layout property at the top of the Razor file:
    @{
             Layout = "/Themes/LeptonX/Layouts/MyCustomLayout.cshtml";
         }
    
    1. Example Reference

    By following these steps, you can fully customize your application's layout to match your requirements, including main menu, submenu, and page actions.

    Sources:

    • https://abp.io/support/questions/8873
    • https://abp.io/docs/latest/ui-themes/lepton-x/mvc

    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
    rbautista@ecosoft.com.mx created

    ok. Una aclaración. Como frontend estamos usando la plantilla Blazor. La respuesta anterior aplica en este caso?

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.1.0-preview. Updated on October 14, 2025, 08:24