The Default Tool Bar

Textstem comes with a small admin tool bar for the public site, with links to the dashboard and to edit the current page. It shows for signed-in users who have the update posts permission and have turned on Admin Helpers in the admin (stored in the show-admin-helpers cookie).

To show the toolbar, add this to the page layout (e.g. guest.blade.php):

<x-textstem::admin-helpers />
<x-textstem::adminbar :edit_url="$edit_url ?? '#'" />

The renderer shares $adminbar with every view, and the toolbar reads it, so there is nothing else to pass. <x-textstem::admin-helpers /> loads the toolbar's stylesheet, and the inline helpers' script when they are on; put it in the <head>.

Inline Admin Helpers

Textstem also supports inline admin helpers, which outline parts of the page and link them to the admin editor. The "editable option" helper does this for global options rendered into the page; the "editable component" helper does it for each block.

Both are on by default once an administrator turns on Admin Helpers. Editors then switch them on and off from the toolbar (?helpersOn=1 / ?helpersOn=0, remembered in the session). To turn either off for a site, set it to 0 in config/textstemapp.php:

'inline-component-editor' => 0,
'inline-option-editor' => 0,

The helpers' JS and CSS are published with the package's other assets. After updating the package, refresh them:

php artisan textstem:refresh-assets

With React rendering, the published React layout draws its own toolbar from the shared textstem.adminBar prop instead.

esc