Liquid Shortcuts

Take a tour!

Liquid Shortcuts

The liquid template language used by aPeel allows for some easy shortcuts to save you some key stroke when designing your layouts, and to help keep things more readable when you need to go back and revisit a design.

Stylesheet shortcuts

To include a stylesheet in your layout you can use the stylesheet shortcut to cut down on the clutter.

This:

{{ 'layout' | stylesheet }}

Will be turned into this:

<link href="/files/css/layout.css" rel="stylesheet" type="text/css" />

Of course, you could just write out the entire link tag yourself, but really, which one is easier on the eyes?

Image shortcuts

Just like with stylesheets you can use a short cut to include images in your page.

This:

{{ 'logo.png' | image }}

Will be turned into this:

<img alt="Apeel_logo_small" border="0" src="/files/images/logo.png" />

One caveat: aPeel does not know the dimensions for images in your files/images directory. That means that we can't write out a full image tag with height and width attributes.  So really, it's probably better not to use this tag.  Maybe it will go away.