4rn0/statamic-cp-bar
A Statamic addon that adds a handy control panel bar to the CP, giving editors quick access to common actions, navigation, and tools from a single toolbar. Lightweight to install, easy to configure, and built to speed up everyday content work in the Statamic control panel.
composer require 4rn0/statamic-cp-bar. Statamic addons are auto-discovered, so no manual provider registration is normally needed.php artisan vendor:publish --tag=cp-bar-config
Look first at config/cp-bar.php — this is where enablement, environment gating and the bar's link set will live.Layout injection vs. explicit tag. Depending on how the addon ships, the bar is either injected automatically into responses or rendered via a tag in your layout:
{{ if logged_in }}
{{ cp_bar }}
{{ /if }}
@include('cp-bar::bar')
Prefer the explicit tag in Blade/Antlers layouts for multi-layout sites — automatic injection can behave inconsistently with Livewire, Inertia, or custom response handling.
Environment gating. Default the bar on for local and staging, and decide deliberately for production. For production, gate it behind role rather than disabling it entirely — editors benefit most from it, but you probably don't want it visible to every logged-in member. Combine config gating with a role/permission check:
// config/cp-bar.php
'enabled' => env('CP_BAR_ENABLED', true),
'allowed_roles' => ['super', 'editor'],
Editor workflow pattern. Point the "edit" action at the entry being rendered so the round-trip is content-driven rather than navigation-driven. If the addon exposes the current entry context, use it to build the CP deep link; if not, resolve it yourself in a view composer and pass it into the bar's link set. This is the single highest-value integration for a content team.
Multi-site setups. Where the bar builds a CP URL, confirm it carries the correct site handle — otherwise editors on a secondary site get bounced to the default site's edit screen and can silently edit the wrong localized entry. Test with at least two sites before rolling out.
Custom links. If the package supports registering items, treat the bar as an extensible menu rather than a fixed toolbar — add links to your own CP navigation (e.g. a custom dashboard, a cache-clear screen, a search index). Keep custom items in a service provider so they're reviewable, versioned and not buried in config.
Version note (v1.1.0). This is a minor release with no documented breaking changes. Nothing in your integration should require rework; do a standard composer update and re-check the bar renders on a representative front-end page (entry, taxonomy term, and a non-content route such as the homepage) since that's where contextual link logic is most likely to have been touched.
logged_in.Content-Security-Policy headers will silently kill its interaction. Add the necessary style-src/script-src allowances (or a nonce) and test in the browser console, not just by eyeballing the page.enabled true for the env, (2) cache cleared — php artisan config:clear && php artisan view:clear, (3) layout actually contains the tag, (4) user passes the role gate, (5) response isn't served from cache.^1.1 rather than *, commit the lockfile, and skim the diff between tagged versions before deploying — the release notes here only link the compare view, so the actual change surface is in the commits. For an admin-facing addon the blast radius is small, but it renders on every page, so a regression is visible site-wide.How can I help you explore Laravel packages today?