alt-design/alt-admin-bar

dev-main 2025-04-24 15:31 UTC

This package is auto-updated.

Last update: 2025-04-24 15:31:38 UTC


README

Quick links to the control panel, edit current page, cache pages, other gubbins. Kinda extendable 👀

How to Install

You can search for this addon in the Tools > Addons section of the Statamic control panel and click install, or run the following command from your project root:

composer require alt-design/alt-admin-bar

Basic Use

Just slap this in your layout, as Todd Howard says, it should ✨Just Work™ ✨

{{ alt_admin_bar }}

Extending The Bar

We got a lil' event listener when the menu is created, this allows you to add to the menu as you fancy - usage is below:

use AltDesign\AltAdminBar\DTO\MenuItemDTO;

Illuminate\Support\Facades\Event::listen('alt_admin_menu_items', function ($menuItems) {
    
    // Standard link w/ url
    $menuItems[] = MenuItemDTO::make([
        'title' => 'Simple Title',
        'href' => '/simple-link',
    ]);
    
    // Item with Children
    $menuItems[] = MenuItemDTO::make([
        'title' => 'Simple Title With Children',
        'href' => '/simple-title-with-children',
        'children' => [
            MenuItemDTO::make([
                'title' => 'Simple Child',
                'href' => '/simple-child',
            ]),
            MenuItemDTO::make([
                'title' => 'Simple Child ',
                'href' => '/simple-child-2',
            ])
        ]
    ]);
    
    return $menuItems;
    
});

Questions etc

Drop us a big shout-out if you have any questions, comments, or concerns. We're always looking to improve our addons, so if you have any feature requests, we'd love to hear them.

Starter Kits

Addons

Postcardware

Send us a postcard from your hometown if you like this addon. We love getting mail from other cool peeps!

Alt Design
St Helens House Derby
DE1 3EE UK