Content Templater

How do I include a custom field value in the Template

1 year 1 month ago #88709

Jonathan's Avatar Jonathan

My Content Templater template looks like this:

<h2>###EXCERPT###</h2>

<p><iframe width="1280" height="720" src="###VIDEO URL###" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><p>

The alias for the Excerpt field is "excerpt"
The alias for the Video field is "video"

When I go to add the fields to the template it asks me to input a value. That value is in the custom field. How do I get the custom field value into the template?

1 year 1 month ago #88712

Peter van Westen's Avatar Peter van Westen Admin

Please try the latest development version from:
www.regularlabs.com/development-releases

You should now be able to place custom field data of the current article using the article:... Dynamic Tags:

[[article:my-url-field]]
Please not that this will output the content as the field would on the frontend. So a URL custom field would output an html link.

If you only want the raw value (so just the url) you can do:
[[article:my-url-field:value]]

1 year 1 month ago #88714

Jonathan's Avatar Jonathan

So you mean like this?

<h2>[[article:excerpt:value]]</h2>
<!--gets the value inside the custom excerpt field-->

<p><iframe width="1280" height="720" src="[[article:video:value]]" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><p>
<!--gets the value inside the custom video field-->
I ask because your instructions tell us how to install and update the plugin, but oddly enough there are no examples on how to use them.

1 year 1 month ago #88718

Peter van Westen's Avatar Peter van Westen Admin

Yes, that should work. Have you tried?