Templating the Select field

The Select field will add a dropdown select box of choices for the content authors to pick from.

Output select value

Here is an example of how to integrate the selected text value from the Select field.

  • ejs
  • pug
  • pug (API v1)
Copy
<p class="category">Category: <%= document.data.category %></p>
Copy
p.category Category: !{document.data.category}
Copy
p.category Category: 
   != document.getText('article.category')

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.