File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,37 @@ With content:
288288 A placeholder.
289289 </turbo-frame>
290290
291+ Minimal layout for Turbo Frames
292+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
293+
294+ .. versionadded :: 2.22
295+
296+ The minimal layout for Turbo Frames was added in Turbo 2.22.
297+
298+ Since Turbo does not need the content outside of the frame, reducing the amount that is rendered can be a useful optimisation.
299+
300+ .. code-block :: html+twig
301+
302+ {% extends '@Turbo/frame.html.twig' %}
303+
304+ {% block body %}
305+ <turbo-frame id="frame_id">
306+ Content of the Turbo Frame
307+ </turbo-frame>
308+ {% endblock %}
309+
310+ {# renders as: #}
311+ <!DOCTYPE html>
312+ <html>
313+ <head>
314+ </head>
315+ <body>
316+ <turbo-frame id="frame_id">
317+ Content of the Turbo Frame
318+ </turbo-frame>
319+ </body>
320+ </html>
321+
291322Writing Tests
292323^^^^^^^^^^^^^
293324
You can’t perform that action at this time.
0 commit comments