Templating the Key Text field

The Key Text field allows content writers to enter a single string.

Usage

Here’s an example of how to integrate a Key Text field into your template.

  • ejs
  • pug
  • pug (API v1)
Copy
<h1 class="title"><%= document.data.title %></h1>
Copy
h1.title !{ document.data.title }
Copy
h1.title !{ document.getText('blog-post.title') }

Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.