Download the PHP package xddesigners/silverstripe-grouped-cms-menu without Composer
On this page you can find all versions of the php package xddesigners/silverstripe-grouped-cms-menu. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xddesigners/silverstripe-grouped-cms-menu
More information about xddesigners/silverstripe-grouped-cms-menu
Files in xddesigners/silverstripe-grouped-cms-menu
Package silverstripe-grouped-cms-menu
Short Description Collapsible, grouped CMS menu for Silverstripe CMS 6 with configurable Font Awesome. Keeps the native admin sidebar (collapse + version); colours/logo are left to the project.
License BSD-3-Clause
Informations about the package silverstripe-grouped-cms-menu
Silverstripe Grouped CMS Menu
Collapsible, grouped left-hand admin menu for Silverstripe CMS 6.
It groups the native LeftAndMain menu by a simple config, overriding only
LeftAndMain_MenuList.ss. The rest of the native sidebar is untouched — the collapse
toggle and the version indicator keep working — and colours/logo are left to your project
theme. Groups with two or more present items become collapsible parents (open/closed state
persists per group in localStorage); single-item groups and ungrouped items render as
normal rows.
- No jQuery/entwine dependency — the collapse behaviour is a tiny vanilla script that
re-applies itself after the admin's PJAX re-renders (via a
MutationObserver). - Configurable Font Awesome so
fas/far/falicon classes render on group headers (free CDN by default; drop in a paid kit id).
Requirements
- PHP
^8.1 silverstripe/framework^6silverstripe/admin^3
Installation
Then flush: ?flush=all.
Configuration
Define your groups on LeftAndMain.menu_groups in your project config
(e.g. app/_config/cms-menu.yml). Each key is a group title; each group lists the menu-item
Codes to pull into it. A Code is the menu item's class with backslashes replaced by
dashes — e.g. SilverShop\Admin\OrdersAdmin → SilverShop-Admin-OrdersAdmin.
Notes:
- A group needs 2+ present items to become a collapsible parent; with one present item it renders as a normal row.
- Items you don't assign to a group keep their native position (ordered by their own menu priority).
priorityorders the groups themselves; higher shows first. Ungrouped items sort by their native menu priority.
Font Awesome
Group icon_class values like fas fa-shopping-cart need Font Awesome loaded. By default the
free CDN stylesheet is added for you. To use a paid/pro kit, or to change/disable the
stylesheet:
You can also use Silverstripe's built-in font-icon-* classes as icon_class values, in
which case no Font Awesome is required.
Translations
Group titles and the toggle label go through _t():
XD\GroupedCmsMenu\Group.<Code>— the group title, where<Code>is the group name with spaces replaced by underscores (default: the group name itself).XD\GroupedCmsMenu.Toggle— the collapse button'saria-label(default:Toggle group).
How it works
The extension adds a GroupedMainMenu() method to LeftAndMain and ships a
LeftAndMain_MenuList.ss template override that loops it. Because only the menu-list partial
is replaced, everything else the core sidebar does (collapse, version badge, section
highlighting) is preserved. Group open/closed state is stored per group under
xdCmsGroup_<id> in localStorage.
License
BSD-3-Clause. See LICENSE.