Configuration

AdminLTE adds a small settings form to Drupal's standard theme settings page. Configure it at /admin/appearance/settings/adminlte — the keys are defined in the theme's config schema and persisted as theme settings.

The theme settings

At Appearance → Settings → AdminLTE 4 (/admin/appearance/settings/adminlte) you get an AdminLTE layout section with two options:

SettingKeyTypeDefaultPurpose
Default colour modedefault_color_modestringautoauto (follow OS) / light / dark. Applied on a visitor's first visit; they can override it with the navbar toggle and the choice is remembered in the browser.
Dark sidebarsidebar_darkbooleantrueRenders the sidebar with a dark surface regardless of the page colour mode (applied via data-bs-theme="dark" on the sidebar).

Config schema

The settings are typed in config/schema/adminlte.schema.yml so they validate and export cleanly:

adminlte.settings:
  type: theme_settings
  label: 'AdminLTE settings'
  mapping:
    default_color_mode:
      type: string
      label: 'Default colour mode'
    sidebar_dark:
      type: boolean
      label: 'Dark sidebar'

Setting values with Drush

Theme settings live under the adminlte.settings config object, so you can set them without visiting the UI:

drush config:set adminlte.settings default_color_mode dark
drush config:set adminlte.settings sidebar_dark true

How the settings are consumed

The theme reads the settings in adminlte.theme via theme_get_setting() and exposes them to the templates. default_color_mode seeds the inline theme-init script in html.html.twig (so the right mode is applied before the first paint), and sidebar_dark drives the sidebar's data-bs-theme attribute in page.html.twig:

function _adminlte_layout_settings(): array {
  return [
    'default_color_mode' => theme_get_setting('default_color_mode', 'adminlte') ?? 'auto',
    'sidebar_dark' => (bool) (theme_get_setting('sidebar_dark', 'adminlte') ?? TRUE),
  ];
}

The form itself is declared in theme-settings.php via hook_form_system_theme_settings_alter(). The Default colour mode only sets the first-visit fallback — once a visitor toggles the navbar control, their explicit choice (stored under localStorage['lte-theme']) wins on every subsequent page load. See Theming & Dark Mode for the toggle internals.

Block configuration

Most of what you see in the shell — which menus, breadcrumbs, page title and account menu appear and where — is ordinary Drupal block configuration. Adjust it at /admin/structure/block using the regions this theme defines (see Layout and Menu & Sidebar).


AdminLTE 4 · Drupal port Edit on GitHub