{% extends "admin/base.html" %} {% block title %}{{ 'Edit topic' if topic else 'New topic' }}{% endblock %} {% block head_extra %} {% endblock %} {% macro val(field, default='') -%} {%- if form is not none -%}{{ form.get(field, default) }} {%- elif topic is not none -%}{{ topic[field] if topic[field] is not none else default }} {%- else -%}{{ default }}{%- endif -%} {%- endmacro %} {% block content %} {% set current_section = (form.get('section_id') if form else (topic.section_id if topic else request.args.get('section'))) %} {% set current_media = (form.get('media_type') if form else (topic.media_type if topic else 'none')) %}

{{ 'Edit topic' if topic else 'New topic' }}

{{ topic.title if topic else 'Add a new topic to a section.' }}

← Back
Body
{% set pub = (form.get('is_published') == '1') if form is not none else (topic.is_published if topic else True) %}
Media

image → <img> · video → <video> · embed → <iframe> (use a YouTube /embed/ URL)

Link button (optional)
Cancel
{% endblock %} {% block scripts %} {% endblock %}