Skip to content

Commit 4263b61

Browse files
authored
Update index.rst
1 parent c160f73 commit 4263b61

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Turbo/doc/index.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,12 +295,16 @@ Minimal layout for Turbo Frames
295295

296296
The minimal layout for Turbo Frames was added in Turbo 2.22.
297297

298-
Since Turbo does not need the content outside of the frame, reducing the amount that is rendered can be a useful optimisation.
298+
Since Turbo does not need the content outside of the frame, reducing the amount that is rendered can be a useful optimisation. However, this optimisation prevents responses from specifying ``head`` content as well. There are cases where it would be useful for Turbo to have access to items specified in ``head``. To specify the heads, you must then use a minimal layout for frame, rather than no layout. With this, applications can render content into the ``head`` if they want.
299299

300300
.. code-block:: html+twig
301301

302302
{% extends '@Turbo/frame.html.twig' %}
303303

304+
{% block head %}
305+
<meta name="alternative" content="present" />
306+
{% endblock %}
307+
304308
{% block body %}
305309
<turbo-frame id="frame_id">
306310
Content of the Turbo Frame
@@ -311,6 +315,7 @@ Since Turbo does not need the content outside of the frame, reducing the amount
311315
<!DOCTYPE html>
312316
<html>
313317
<head>
318+
<meta name="test" content="present" />
314319
</head>
315320
<body>
316321
<turbo-frame id="frame_id">

0 commit comments

Comments
 (0)