Change record status: 
Project: 
Introduced in branch: 
11.3.x
Introduced in version: 
11.3.0
Description: 

A new route option _htmx_route is added. When this option is TRUE, the HTMX renderer created in #3522597: Return only main content for selected htmx requests will be used to return a response that contains only the main content.

Example

test_htmx.attachments.route_option:
  path: '/htmx-test-attachments/route-option'
  defaults:
    _title: 'Using _htmx_route option'
    _controller: '\Drupal\test_htmx\Controller\HtmxTestAttachmentsController::replace'
  requirements:
    _permission: 'access content'
  options:
    _htmx_route: TRUE
Impacts: 
Module developers
Site templates, recipes and distribution developers