This update introduces permission-aware template variables and admin utility URLs, making it easier to build editor-focused UI directly in the frontend.
These additions enable templates to determine whether the current user can edit a page and provide convenient access to administrative actions.
✨ New Features
page.isEditable
Facet now exposes a new template variable:
page.isEditableThis variable indicates whether the current user has permission to edit the current page.
It allows templates to conditionally render UI elements intended only for editors.
Example
{{#if page.isEditable}}
<a href="{{ page.url }}?edit=1">Edit this page</a>
{{/if}}Typical use cases include:
- inline edit buttons
- editor toolbars
- contextual editing controls
- page-level management tools
If the user does not have edit permission, the block will not render.
Admin URL Variables
Facet now provides additional site-level variables for common administrative links:
| Variable | Description |
|---|---|
site.adminUrl | Admin dashboard |
site.adminProfileUrl | Admin profile page |
site.adminLogoutUrl | Logout URL |
These variables simplify building frontend admin navigation without hardcoding backend paths.
Example
<a href="{{site.adminProfileUrl}}">Profile</a>
<a href="{{site.adminLogoutUrl}}">Logout</a>UI Example: Quick Admin Links
A common use case for these additions is a quick admin toolbar displayed on the frontend for logged-in users.
This toolbar can provide shortcuts to common admin actions such as editing the current page, accessing the dashboard, managing pages, or logging out.
Example implementation:
{{#deferred skeleton-width="0" skeleton-height="0"}}
{{#if user.isLoggedin}}
<div
class="uniui-admin-links fixed right-4 top-1/2 -translate-y-1/2 z-50"
aria-label="Quick admin links"
>
<div class="uniui-admin-links__group">
{{#if page.isEditable}}
<a href="{{page.url}}?edit=1" aria-label="Edit page">
Edit
</a>
{{/if}}
<a href="{{site.url}}faceflow/">Dashboard</a>
<a href="{{site.url}}faceflow/pages-manage">Pages</a>
<a href="{{site.adminProfileUrl}}">Profile</a>
<a href="{{site.adminLogoutUrl}}">Logout</a>
</div>
</div>
{{/if}}
{{/deferred}}Behavior Summary
| Condition | Result |
|---|---|
| User not logged in | Component not visible |
| Logged in without edit permission | Admin links visible, edit button hidden |
| Logged in with edit permission | Full toolbar visible |
This ensures that management UI is only available to authorized users.
Summary
This release adds new capabilities for building editor-aware frontend interfaces.
New template variables
page.isEditable
New site variables
site.adminUrlsite.adminProfileUrlsite.adminLogoutUrl
These improvements make it easier to integrate contextual editing and admin navigation directly into Facet templates while maintaining proper permission control.




Discussion
Join the conversation and share your thoughts
No comments yet. Be the first to share your thoughts!