Admin

The editing interface, mounted as ordinary pages.

On this page

What it is

The admin is an addon mounted at a slug of your choosing, admin by default. It has no routes outside the page tree: the tree, the editor, history, users and system views are pages with views, so permissions, overrides and :block fragments work on them as they do on your own pages.

{
    "addons": {
        "phlat/admin": {
            "mount": "admin",
            "theme": "phlatdark"
        }
    }
}

Editing

The editor shows the fields of the page's view, each rendered by its fieldtype. Edits autosave as a draft, and the live preview beside the editor reloads in place, so you browse the real site while you edit. Save publishes the draft and commits it through History, so every save is a git commit and the History tab can restore any earlier one.

Roles

The built-in admin and guest roles ship with core. A site defines its own roles and sets who may open a page with the page's access setting. What an editor sees adapts to their role.

Customising

Views and field templates are looked up site first, so site/views/@admin/... replaces any admin template, and site/fields/@phlat/{name}/render.latte replaces how a field renders. An addon can add its own panels as children of the admin section, and the toolbar is built from the page tree, so it needs no list to maintain. Bookmarks are a pages field on the admin root: pages an editor wants one click away.

The views, fields and fieldtypes an admin edits are hand-authored files in the site, not configured in the admin.