Media

On this page

Overview

The media archive is a module where you store all files on your page. You can create folders and upload files that you can later retrieve with the following drops.

 


Folders

You can fetch all files that's located in a specific folder by using that folders id. 

You can find the id belonging to a specific folder by, in the media module, hovering over the folder name. The numbers that you see after /media?folder=XXXX is the id. For example /media?folder=1234 

 

Get files from a specific folder 

Loop through all files in your chosen media folder, in the example below the media folder ID is 1234.


{% for file in media[1234] %}
  {{ file.url }}
{% endfor %}

Media file

Below you can see all the available drops on the media file object


Name Description
file.pretty_name Get "display name" set in media archive
file.image? Boolean. Checks if the file is an image or not
file.video? Boolean. Checks if the files is a video or not
file.url URL to the original version of the file
file.small URL to the small version of the file
file.medium URL to the medium version of the file
file.original URL to the original version of the file

 

The file versions (small, medium, original) only works with images otherwise the drop will return the default URL.

Updated: 2019-12-05