Skip to content
Login Contact

Custom fields in Amplify layouts

Custom fields let you render article metadata that Marfeel does not extract by default, such as subtitles, author photos, or sponsor logos, directly in your Amplify layouts and post templates. Configure Custom Fields to sync to Amplify, and the extracted values become available for social media images and personalized post text.

Custom fields synced to Amplify are delivered inside each article’s data under the customProperties key. Access them in your HTML and CSS templates with dot notation:

{{customProperties.yourFieldName}}

Custom properties are available alongside the standard article properties (title, description, img, url, sections, authors). The same customProperties key is also available in Recommender layouts when you sync a field to both destinations.

Example: add a subtitle to the social image

Section titled “Example: add a subtitle to the social image”

Many articles include a subtitle or subheadline in their HTML that Marfeel does not extract by default. Extract it with a custom field and render it below the headline on your social image.

Custom Field configuration:

SettingValue
Expression//h2[contains(@class,"subtitle")]
ExtractText Content
Save asCustom field: subtitle
Sync toAmplify

HTML template:

<article data-mrf-amplify-id="subtitle-layout" class="amplify-wrapper">
{{#each content.posts}}
<div class="mrf-amplify-image-container">
<img class="mrf-amplify-image"
data-mrf-amplify="image"
src="{{img}}" alt="{{title}}" />
<div class="mrf-amplify-backdrop"></div>
</div>
<div class="mrf-amplify-title-container">
<h2 class="mrf-amplify-title"
data-mrf-amplify="title"
contenteditable="plaintext-only">{{title}}</h2>
{{#customProperties.subtitle}}
<p class="mrf-amplify-subtitle">{{customProperties.subtitle}}</p>
{{/customProperties.subtitle}}
</div>
{{/each}}
</article>

The {{#customProperties.subtitle}} block conditionally renders the subtitle. Articles without one display the headline only.

Extract the author’s profile image from your article’s structured data and overlay it on the social image.

Custom Field configuration:

SettingValue
Expression$.@graph[?(@.@type=="Person")].image.url
Extract
Save asCustom field: authorImage
Sync toAmplify

HTML template:

<article data-mrf-amplify-id="author-layout" class="amplify-wrapper">
{{#each content.posts}}
<div class="mrf-amplify-image-container">
<img class="mrf-amplify-image"
data-mrf-amplify="image"
src="{{img}}" alt="{{title}}" />
<div class="mrf-amplify-backdrop"></div>
{{#customProperties.authorImage}}
<img class="mrf-amplify-author-photo"
src="{{customProperties.authorImage}}" alt="{{authors.[0]}}" />
{{/customProperties.authorImage}}
</div>
<div class="mrf-amplify-title-container">
<h2 class="mrf-amplify-title"
data-mrf-amplify="title"
contenteditable="plaintext-only">{{title}}</h2>
</div>
{{/each}}
</article>

The {{#customProperties.authorImage}} block only renders when an author image exists, so articles without one display cleanly.

  • Custom Fields — Configure extraction rules and sync destinations
  • Amplify Layouts — Full layout structure, templating, and interactive elements
How do I access custom fields in an Amplify layout template?

Custom fields synced to Amplify are delivered under the customProperties key in each article’s data. Access them in your HTML and CSS templates with dot notation: {{customProperties.yourFieldName}}.

What happens when a custom field value is missing for an article?

Use Handlebars block syntax like {{#customProperties.fieldName}} to conditionally render the element. Articles without the field display cleanly because the block is skipped entirely.

Can I use custom fields alongside standard article properties?

Yes. Custom properties are available alongside the standard article properties such as title, description, img, url, sections, and authors.