{% extends "admin/base.html" %} {% from "admin/_image_picker_field.html" import image_picker_field %} {% set is_edit = page is not none %} {% block title %}{{ 'Edit' if is_edit else 'New' }} page · bragi admin{% endblock %} {% block content %}

{{ 'Edit page' if is_edit else 'New page' }}

{% if is_edit %}

Backlinks »

{% endif %} {% if swap_pending %} {% endif %} {% if demotion_pending %} {% endif %}
{% if swap_pending %}{% endif %} {% if demotion_pending %}{% endif %} {# Hoist current_kind before the resume-fieldset guard below so the comparison doesn't evaluate against Jinja's Undefined and silently return False. #} {% set current_kind = form.get('kind', 'static') %}
Leave at "(root)" for a top-level page.
{% include "admin/_tiptap_editor.html" %}
{% if current_kind == 'resume' %} {% include "admin/_resume_fieldset.html" %} {% endif %}
A site can have at most one post_index page. Promoting another page to post_index will demote the existing one back to static and you'll be asked to confirm before the change is saved.
Navigation {% if is_edit and site is defined and site.home_page_id == page.id %} {% endif %}
Lower numbers come first within this level; ties broken alphabetically by title.
{{ image_picker_field( name="featured_image_id", value=form.get("featured_image_id"), attachment=featured_image, thumb_storage_key=featured_image_thumb_key, label="Featured image", picker_url=url_for("attachment_admin.picker"), site_slug=request.view_args["site_slug"], helper="Optional. Used as og:image / twitter:image and as a card thumbnail. Falls back to the site's default featured image when unset." ) }} {% if is_edit %}
{% endif %}
Cancel
{% if not is_edit %} {% endif %} {# Resume-source plugin widgets (LinkedIn upload, etc.) live OUTSIDE the page-edit form because they post to their own endpoints with their own
elements. HTML5 forbids nested s; the browser strips the inner open tag and the inner
prematurely closes the outer form, orphaning every input below it (status, kind, show_in_nav, ...). Saving in that state silently wipes the orphaned fields back to their defaults (kind -> static, status -> draft). Keep these contributions OUTSIDE the main form. #} {% if is_edit and current_kind == 'resume' %} {% for partial_path in resume_admin_extras() %} {% include partial_path %} {% endfor %} {% endif %} {% endblock %}