Skip to main content

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.

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