{%- if not request.args.get('modal') -%} {% extends 'admin/master.html' %} {%- endif -%} {% import 'admin/lib.html' as lib with context %} {% macro extra() %} {% endmacro %} {% block head %} {%- if not request.args.get('modal') -%} {{ super() }} {{ lib.form_css() }} {%- endif -%} {% endblock %} {% block body %} {%- if request.args.get('modal') -%} {# content added to modal-content #}