Radical Design Course by Jack McDade

From the creator of Statamic

Learn how to make your websites standout and be remembered.

For a software dev like me who has no idea how to create a cute hand-drawn dashed line, this course just 100% works.

— Ira Zayats, Developer

truncate Modifier

Truncates the string to a given length (parameter 1). You can append a string with parameter 2, and if truncating occurs the string is further truncated so that it may be appended without exceeding the desired length.

This differs from safe_truncate in that it may truncate in the middle of a word.

advice: >
So, here’s some advice I wish I woulda got when I was your age:
Live every week like it’s Shark Week.
{{ advice | truncate(90, '...') }}
{{ Statamic::modify($advice)->truncate([90, '...']) }}
So, here’s some advice I wish I woulda got when I was your age:
Live every week like i...
Docs feedback

Submit improvements, related content, or suggestions through Github.

Betterify this page →