Author / Speaker

Author / Speaker

Block for a single author (e.g. whitepaper) or speaker (e.g. webinar): optional avatar, name, job title, and optional cite.

Layouts

  • narrow: Avatar in a 60px column (e.g. whitepaper “Autoren”).
  • wide: Text in 60% column, avatar in 40% column (e.g. webinar “Speaker”).

In static .mjml templates

Fragments with placeholders:

  • author-block-narrow.mjml: {{AVATAR_URL}}, {{NAME}}, {{JOB_TITLE}}
  • author-block-wide.mjml: {{AVATAR_URL}}, {{NAME}}, {{JOB_TITLE}}, {{CITE}}

Use with preprocessor attribute substitution when including.

In API (TypeScript)

import { buildMjmlAuthorBlock } from '~/utils/emailTemplates';
buildMjmlAuthorBlock({
avatarUrl: buildProductionUrl(getEmailImagePath('person-avatar', person.slug), base),
name: person.name,
jobTitle: person.jobTitle ?? null,
cite: speaker.cite ?? null, // webinar only
layout: 'narrow', // or 'wide'
});