Home Theme-templates Layouts-theme-name
layouts/theme-name.liquid
{{ content_for_header }}, {{ content_for_closing_body }} and {{ content_for_layout }}
There are three Liquid objects that are required in theme-name.liquid:
-
The {{ content_for_header }} variable must be placed between the opening and closing <head> tag. It inserts the necessary Yoolk Liquid scripts into the <head> which includes scripts for Google Analytics, SEO meta tags, CSRF meta tag, and more.
-
The {{ content_for_layout }} variable must be placed between the opening and closing <body> tag. It outputs dynamic content generated by all of the other templates (index.liquid, product.liquid, etc.).
-
The {{ content_for_closing_body }} variable must be placed before the closing body (</body>) tag. It inserts the scripts' tags below:
- google remarketing code
- google conversion code (Page Load)
The layouts/<theme-name>.liquid
can be thought of as the master template; all other templates are rendered inside of layouts/<theme-name>.liquid
. Any elements that are repeated in a theme (ex: site navigations, header, footer, etc.) should be placed inside layouts/<theme-name>.liquid
.
There are a few steps to apply shopping cart in order to display cart icon at the top right of the page.
-
The {% shopping_cart %} tag should be placed between the opening and closing <body>
-
Required JavaScript/StyleSheet Libraries below:
sample/all.js.coffee
#= require yoolk/jquery.shopping-cart
sample/all.scss
@import "yoolk/liquid/shopping-cart";
Requirements for the Theme
If you’re looking to submit your theme to the Yoolk Theme, the layouts/theme-name.liquid template of your theme must meet the following conditions:
- Logo or listing.name is in the header and links to the homepage
- Main navigation is present and uses the default “Main Menu” link list
- Main navigation has active and hover styles defined as necessary. Focus states are required
- Use proper breadcrumb
- Links to log in for website owner are present
- If website owner is logged in, switch the link to point to the my office
- Language dropdown is present if its data is in other languages.
- Includes follow us icons in the header or footer
- Must dynamically output proper SEO code for title, meta description, duplicate content, etc.
- The doctype at the top of the layouts/theme-name.liquid file, specifying whether it’s transitional or strict, (i.e.<!DOCTYPE html>)