Template Tag Type Text

Template Tag Type Text

In this video we are looking at template tags with a type attribute of text. You can see an example in the default template text.html. While that template just has a single text field in it, more usually fields are grouped along with markup in a larger template, for example as seen in the default article.html template.

Text is the simplest content type – it represents a basic line of text, and is edited with a single-line text input.

If you want to make sure your content editor completes this field set the required attribute to true.

If you want the value of this field to become the title of the field in the control panel, add title.

The text field is ideal if you are completely controlling the markup around the content, so for example when the editor is adding a heading, a URL, or a line of an address.