{#- A response fetched by htmx is swapped into a page that already has a
, a navbar and a footer - emitting them again nests a second full document inside the first, which is what put a second logo on the page for an unresolvable PAC-ID. So for an htmx request this base contributes nothing but the page's own content block; direct navigation (the initial page load, or opening an error url straight in the browser) still gets the whole document. Every template extending this one inherits that, including an issuer's own pac_issuer_error.jinja.html override - which is why the switch lives here rather than in the error template. `request` is a Flask global copied into this blueprint's env (see app_factory's _build_jinja_env), not Flask's own render_template context. -#} {%- set is_htmx_swap = request.headers.get('HX-Request') -%} {%- if not is_htmx_swap -%}