Harmony Templates

Templates in Harmony use the Liquid template language, which is safe, flexible, and powerful. Learning the details will let you get the most out of the template system.

Overview

The Harmony template system uses Liquid, a simple, secure template language that’s easy to learn, and very powerful. Get a quick overview of how each part of the system works, and how you can use it to create simple, dynamic templates.

Objects

On any page, you’ll have access to a few objects and collections you can use to display, or find more data on your page. item is always the current page, and any data that it holds depending on its type (page, blog index, blog post, etc. site contains some basic information about the site. request has a few pieces of data regarding the current request. blog is available on any page inside a blog, and references the current blog object.

Filters

Use Liquid filters to manipulate, process, and transform pieces of data in your template. Manipulate text, html, arrays, numbers, and even objects using a simple, memorable syntax.

Template Tags

Template tags are a powerful way to create markup or variables. We’ve taken the most common things that we use in building our sites, and bundled them into easy-to-use, customizable tags.

Loops and Conditionals

Loops and conditionals add tremendous power for your templates to behave differently in different situations. It’s important to understand exactly what tools you have available, so you can make your templates as efficient as possible.

Examples

Need some inspiration, or looking to see how to build something specific using Harmony? Here’s where we collect common theme snippets and examples for you to copy and use on your own site, or tweak as needed.

If you have something you’d like added to this list, log into your Harmony account and click the Feedback link at the top, we’d love to here what you’ve come up with.

Template Data

Harmony’s template data allows you to fill your site with custom data very easily.