Blocks
A block is how one slot renders in an edition. Each slot of a publication names a block, with optional props the block checks. Blocks are code EdgeKit ships, the same for every organization, so the screen Messaging › Design › Blocks is read-only.
| Block | Slot kinds | Renders |
|---|---|---|
rich-text |
Rich text | The text the editor writes. |
story-list-hero |
Feed, curated | Each story large: its image across the column, headline and summary. |
story-list-compact |
Feed, curated | One row per story: headline and summary, with a thumbnail when it has an image. |
story-cards |
Feed, curated | One card per story: image, headline, summary and a read-more link. |
headline-list |
Feed, curated | Headlines only, one link per bullet, no images. |
image-grid |
Feed, curated | A grid of story images, each linked. |
ad-unit |
Ad | Your ad network’s tag, for each recipient. See Ad slots. |
byline |
Rich text | Who wrote the edition: a name, role and photo per author. See Name the authors. |
image |
Image | One image from the Media Library, linked or not. See Add an image. |
A block renders only the slot kinds it accepts, and a slot whose block refuses its kind, or whose props the block refuses, cannot be saved. A block’s key never changes once EdgeKit ships it.
Show a story’s section, authors, date and photo credit
Section titled “Show a story’s section, authors, date and photo credit”story-list-hero, story-list-compact and story-cards take these settings, each off unless turned on:
| Setting | Shows |
|---|---|
| Section | The story’s section on the publication’s site, above its headline. |
| Bylines | Its authors, under its headline. |
| Publish date | When it went live, in the schedule’s time zone, else the organization’s. |
| Image credit | The photo credit from your CMS, under the image. story-list-hero and story-cards only. |
Turn them on in the slot on the publication. An editor can also change each of them for one edition, and the
Headline font of story-cards. A story without one of these shows nothing in its place. An image an editor
picked has no credit. In an email, a personalised feed slot shows none of them.
Name the authors
Section titled “Name the authors”byline is a rich-text slot that shows no text. Its props are the people it may name, and an editor picks which of
them one edition names:
| Prop | Holds |
|---|---|
people |
1 to 50 people, each a name, an optional role and an optional https photo. |
authors |
The names this edition shows, in order, each one of people. Unset, the byline does not show. |
Set people in the slot on the publication. In an edition, open the slot’s Settings and turn on each author;
the slot’s body shows who it names. With nobody turned on, the slot is left out of the edition, so a publication can
carry a byline that only some editions show. The block writes “By” and the names in the edition’s language, then a row per
author with their photo, name and role. A byline on its own is not content: an edition whose other slots are empty is
not sent.
An organization’s stack has to run the EdgeKit release that renders bylines before one can be saved, on its own or in a stack slot’s palette. Until then the save is refused and names both releases.
Add an image
Section titled “Add an image”An image slot holds one image from the Media Library and an optional link. Add one with Add image slot on the publication, or as an entry in a stack slot’s palette. Its two props:
| Prop | Holds |
|---|---|
image |
The picked image: its url, alt text, width and height in pixels, and asset. |
link |
Where the image links: { url }, an https URL, or { contentItemId }, a story. Unset, it links nowhere. |
Pick an image and a link on the publication to use them in every edition, or leave them empty. In an edition, the slot’s body shows the image with Choose image or Replace, its alt text, and its link. A variant can pick its own. A change shows Changed, with a reset to the publication’s.
For the link, choose URL and type one, or Story and search the stories published on the publication’s site by headline. A story link is read when the email renders: the image links to the story’s page on the site as it is at the send, and a template gets the story’s headline, summary, section, authors and publish date. If the story is no longer published on the site, the image links nowhere. An edition with no image picked leaves the slot out.
An image slot on its own is not content: an edition whose other slots are empty is not sent. An experiment arm cannot vary it.
The image goes into the email 1,120 pixels wide, twice the width it shows at, or narrower when the original is. EdgeKit makes the URL once, when you pick the image, so an email already sent keeps the image it went out with even after the image’s focal point or alt text changes. JPEG, PNG and GIF images keep their format; any other is sent as a JPEG.
A rich-text slot takes images too, between paragraphs: Add image in its toolbar opens the same picker. A rich-text slot holding only an image is not empty.
An organization’s stack has to run the EdgeKit release that renders images before an image slot, or a rich-text image, can be saved. Until then the save is refused and names both releases.
Preview a block
Section titled “Preview a block”Open a block to see it in the default template, as a web page, filled with the newest stories on a site you pick, in the look of a brand you pick or none. A site with nothing published yet has nothing to fill it with.