Skip to content
Log in

Medium - Liquid Object Reference

On this page

Description

The Medium object contains information about a medium that has been uploaded via the CMS.

:::note This object supports custom data via the data attribute. :::

Backed by

This drop renders the s_c__Media__c Salesforce object. A theme writes it as medium.

Liquid attribute Salesforce field
alt_text s_c__Alt_Text__c
description s_c__Description__c
file_type s_c__File_Type__c

Every other attribute on this drop is derived by StoreConnect rather than read straight from one field. The Attributes section lists them all.

Fields you add yourself are not listed above. Expose one with a Custom Data Mapping record, then read it from medium.data. See custom data fields in Liquid.

Attributes

Attribute Type Description
alt_text String Returns the value of the Alt Text attribute
description String Returns the value of the Description attribute
document Document Returns a Document object for this Medium if the file_type is ‘document’
document? Boolean Returns true if this Image is a document
download_url String Returns a url for this Medium that will trigger a file download in the browser
file File Returns a File object for this Medium if the file_type is ‘file’
file_type String Returns the value of the File Type attribute
file? Boolean Returns true if this Image is a file
id String Returns the unique id for this Medium
image Image Returns an Image object for this Medium if the file_type is ‘image’
image? Boolean Returns true if this Image is an image
name String Returns the value of the Name attribute
url String Returns the complete url for this Medium
video Video Returns a Video object for this Medium if the file_type is ‘video’
video? Boolean Returns true if this Image is a video

Available on

Was this article helpful?

Was this article helpful?