Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

Bought Jack McDade's course on design. Going through it now...and it is SO well done!

— Justin Jackson, Transistor.fm

wrap Modifier

Wraps a string with a given HTML tag. Has the nice benefit of returning null if there is no data, eliminating the need for simple {{ if }} wrappers.

title: As the World Turns
{{ title | wrap('h1') }}
<h1>As the World Turns</h1>

You may also use Emmet-style CSS classes to be added to the tag.

{{ title | wrap('h1.fast.furious') }}
<h1 class="fast furious">As the World Turns</h1>

The wrap modifier also accepts passing in arrays.

team_members:
- Jack
- Jason
- Jesse
- Josh
- Duncan
- The Hoff
{{ team_members | wrap('li') | join(' ') }}
<li>Jack</li>
<li>Jason</li>
<li>Jesse</li>
<li>Josh</li>
<li>Duncan</li>
<li>The Hoff</li>
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →