Skip to main content

Module admin_bar

Module admin_bar 

Source
Expand description

The admin bar: a small floating bar on public pages for someone signed in to the CMS admin, with Edit this page and Admin links.

It shows for an admin session only (not a member, not a visitor), in the admin’s interface language, and can be collapsed to its icon (the choice is remembered in the browser). Pages shown with it are sent no-store; the page cache already skips signed-in requests. The labels travel with the request’s task (scope), like the template inspector’s flag, so the render code needs no extra parameter.

Structs§

Labels
The bar’s text, in the admin’s language.

Functions§

active
Whether the current render shows the bar.
add
The page with the bar added before </body>. page_id 0 (a page not stored, such as a built-in error page) leaves out Edit this page.
scope
Run fut (a page render) with the bar on (Some) or off.