content_for_layout

Dynamically returns content based on the current template.

Include the content_for_layout object in your layout files between the <body> and </body> HTML tags.

📘

Note

The content_for_layout object is required in theme.liquid.

<!DOCTYPE html>
<html>
  <head>
  	<!-- ... -->
  	{{ content_for_header }}
  </head>
  <body>
    <!-- ... -->
    {{ content_for_layout }}
    <!-- ... -->
  </body>
</html>