HTMX was added to Drupal 11.3.x.
Adding this url argument tells drupal to deliver an HTMX response, which is the requested page's main content.
?_wrapper_format=drupal_htmx
For example, add this to your page.html.twig template.
<button
hx-get="/node/1?_wrapper_format=drupal_htmx"
hx-target="#content-container"
>Click me</button>
<div id="content-container"></div>Clicking the button will load content from node 1 and insert it in the container.
These headers are included in the request when you click on the button:
HX-Request: true
HX-Target: dialog-container
HX-Current-URL: https://drupal11.ddev.site/Resources
Change records
