{# Slug field for the page edit/new form. Wrapped in a stable id so the recompute-preview endpoint can swap the whole field + preview. Variables (passed via `with` from page_edit.html, or directly by the recompute_slug_preview endpoint): slug : current slug string full_path : full path the slug resolves to (optional) error : recompute error message (optional) is_edit : whether this is an existing page (button only then) page_id : the page id (for the button's hx-post URL; edit only) site_slug : the site slug (for the button's hx-post URL) #}
{% set parent_path = page_parent_prefix(parent_id, site_id) %} {# When the page is nested, show the parent path as a read-only prefix so the bare leaf slug reads in context (/about/ + team), not as a standalone /team/. #}
{% if parent_path %}{% endif %} {% if is_edit %} {% endif %}
{% if error %}
{{ error }}
{% endif %} {% if full_path %}

Will live at: {{ full_path }}

{% endif %}