Skip to content

Template tags ​

Show a Wyvern field in your template with its field name, for example {body}. The parameters below are all optional.

Word limit ​

word_limit
Limit the content to a number of words.

suffix
Text after the limited content, such as a "Read more" link. Default: ….

{body word_limit="50" suffix="..."}

Character limit ​

character_limit
Limit the content to a number of characters.

suffix
Text after the limited content. Default: ….

{body character_limit="300" suffix="..."}

Strip tags ​

strip_tags
Remove the HTML tags of the content.

allowable_tags
The tags that are kept.

{body strip_tags="yes" allowable_tags="<p><a>"}

Image class ​

Add a class to the images in the field, on top of the Image class setting.

{body image_class="img-responsive"}

Responsive images ​

responsive
no leaves out the srcset, sizes, width/height and lazy loading for this field; yes adds them also when the setting Responsive images is off.

loading
eager loads the images of this field right away instead of lazy, for example at the top of the page.

{body responsive="no"}
{body loading="eager"}

See Responsive images.

Links to pages, entries and templates are stored as tags, and become urls when the template is rendered. They also work in your templates:

<a href="{page_url:12}">About us</a>
<a href="{entry_url:345}">Read the review</a>
<a href="{template_url:7}">Contact</a>

See Links.