Sidebar¶
The left sidebar (templates/element/sidebar/main.php) has three parts:
- The brand - the logo and the application name, linked to the home page.
- The sidebar search - a filter field that hides and expands menu items as
you type. It targets the menu container by its
id="navigation". - The sidebar wrapper - the navigation menu generated from the plugin's
config/menu.php.
The menu¶
The default menu is the plugin's config/menu.php (the CakeLte.menu config
file). The items already use the __() translation function, so they can be
localized by the consuming application.
The item format is shared with the generic Menu helper; see Menus
for the item reference, active items and examples.
The plugin always loads its own CakeLte.menu; copying the file to
config/menu.php alone does not override it. To use an application menu:
- Copy the sidebar element:
-
Put your menu in
config/menu.php. -
Edit
templates/plugin/CakeLte/element/sidebar/menu.phpto load that file:
Sidebar search¶
The sidebar search filter is provided by AdminLTE's SidebarSearch (bundled in
adminlte.js). It filters the menu items by the id="navigation" container and
expands any subtree that holds a match. No JavaScript configuration is needed.