Skip to main content

PLP Editorial Component

The PLP Editorial component displays a hero media element (image or video) at the top of the product grid on collection pages. It occupies a 2-column span in the grid layout and supports an optional text overlay.


Overviewโ€‹

The editorial can display one of two media types:

  • Video โ€” Sourced from Builder.io (plp-editorial-video model)
  • Image โ€” Sourced from Shopify metafield (config.editorial_image)

Important: Video takes precedence over image. If both are configured, only the video will display.

Editorial Image

Configurationโ€‹

Image Editorial (Shopify)โ€‹

Configure the image editorial directly in Shopify on the collection metafields:

MetafieldTypeDescription
config.editorial_imageFile (Image)The editorial hero image
config.editorial_textSingle line textOptional text overlay displayed on the image

The image will render using the TitleCard component with the aspect ratio matching the product card grid.

Video Editorial (Builder.io)โ€‹

Video editorials are configured through Builder.io using the plp-editorial-video content model.

Setup Steps:

  1. Navigate to Builder.io/content
  2. Create a new entry in the plp-editorial-video model
  3. Upload a video using the Cloudinary image editor
  4. Copy the ID of the Builder entry
  5. In Shopify, add the Builder entry ID to the collection metafield: config.editorial_video
Editorial Video Builder inputs Editorial Video metafield
MetafieldTypeDescription
config.editorial_videoSingle line textBuilder content model ID for the video

The video will autoplay, loop, and be muted by default. A poster image is automatically generated from the video.


Precedence Logicโ€‹

The component follows this priority order:

1. Video (if videoUrl AND videoId exist) โ†’ Render Video
2. Image (if imageUrl exists) โ†’ Render TitleCard with image
3. Neither โ†’ component not rendered

Text Overlayโ€‹

The editorial_text metafield provides optional overlay text that appears on both image and video editorials:

  • Positioned at the top-left of the editorial (top-3 left-8)
  • Styled as white text (text-white)
  • Rendered as an <h2> element
  • Falls back to the collection title for accessibility (aria-label)

Note: The text overlay uses the same Shopify metafield regardless of whether displaying image or video.


Video Specificationsโ€‹

When using video editorials:

PropertyValue
Autoplaytrue
Mutedtrue
Looptrue
Plays Inlinetrue
Preloadmetadata

Videos are served from Cloudinary with automatic poster generation.


Troubleshootingโ€‹

Editorial not displayingโ€‹

  1. Check metafields exist: Verify config.editorial_image or config.editorial_video is set on the collection
  2. Check Builder ID: If using video, ensure the Builder entry ID in config.editorial_video matches an existing entry
  3. Check video data: Video requires both url and public_id from Cloudinary; if either is missing, falls back to image