HTMX: mark route¶
Available since: 3.1.3
Mark one or more routes as HTMX routes by setting the "_htmx_route" option on them. Reacts to the "Alter route" event of the ECA Miscellaneous module. The route name may contain a "*" wildcard.
Runs on the Alter route event
This action only has an effect when it runs in response to the
Alter route event, because it
needs access to the route collection that is being built. The route name
supports a * wildcard, so view.* matches every route whose name starts
with view..
Marking a route sets the _htmx_route option on it, which takes effect for
every request to that route. To return the minimal response for a single
request instead, use the
HTMX: minimal response
action. See
Building HTMX-powered interfaces with ECA.
Fields¶
Route name-
The name of the route(s) to mark as HTMX routes, for example entity.node.canonical. A trailing or embedded acts as a wildcard, for example view. matches every route whose name starts with view..
This field supports tokens.