Metronic Documentation | Keenthemes
logo
The World’s #1 Bootstrap 5 HTML, VueJS, React, Angular & Laravel
Admin Dashboard Ecosystem

This is Metronic 7 documentation!

Upon purchase you can get Metronic 7 version from our Github Repository.
Request Github access
The new Metronic 8 is now available with the most advanced Bootstrap 5, VueJS, React and Laravel foundation with a solid light and dark mode design system, extensive utility classes and custom made in-house components.
View Metronic 8 documentation

To use most of the Metronic build tools, Node.js LTS version is required. Version 14.x LTS is recommended. Some of the plugins and framework in Metronic v7 does not support the latest Node.js version. https://nodejs.org/en/

How to create a custom page

Here is the example on how to create your own page and add it to the left side menu and breadcrumbs.

1. Create a custom Page

Run this Angular CLI command for generate new component:

cd .\src\app\pages\
ng g c my-page

2. Register new component in the theme routing

Register new component in the /src/app/pages/pages-routing.module.ts file:

// Other imports
import { MyPageComponent } from './my-page/my-page.component';
{
    path: '',
    component: LayoutComponent,
    children: [
        {
          path: 'my-page', // <= Page URL
          component: MyPageComponent // <= Page component registration
        },
        {
        path: 'dashboard',
        loadChildren: () =>
          import('./dashboard/dashboard.module').then((m) => m.DashboardModule),
      },
      {
        path: 'builder',
        loadChildren: () =>
          import('./builder/builder.module').then((m) => m.BuilderModule),
      },
// Other code

3.1 Add page to the left static menu

Add page to the left menu in /src/app/pages/_layout/components/aside/aside.component.html file:

// Other code
<!-- begin::1 Level -->
  <li
        class="menu-item"
        aria-haspopup="true"
        routerLinkActive="menu-item-active"
        >
    <a class="menu-link" routerLink="/my-page" routerLinkActive="active">
      <span
            [inlineSVG]="'./assets/media/svg/icons/Design/Layers.svg'"
            cacheSVG="true"
            class="svg-icon menu-icon"
      ></span>
      <span class="menu-text">My Page</span>
    </a>
  </li>
<!-- end::1 Level -->
// Other code

3.2 Add page to the left dynamic menu

If you are using 'dynamic' aside menu, add page to the config /src/app/_metronic/configs/dynamic-aside-menu.config.ts file:

// Other code
  },
    {
      title: 'My Page',
      root: true,
      icon: 'flaticon2-expand',
      page: '/my-page',
      svg: './assets/media/svg/icons/Home/Library.svg'
    },
    {
      title: 'Layout Builder',
// Other code
Think About The Future, Stay Connected With Us
The More We Learn, The More We Are Able To Innovate & To Develop