Access files and media

On this page

Overview

There's shortcut tags that we can use to access paths and urls we need when we create templates.

To access a stylesheet or javascript file we use the following syntax:

 

Access stylesheet

{{ 'main.css' | template_path }}

Access JavaScript

{{ 'main.js' | template_path }}

 

Access template assets

{{ 'logo.png' | asset_path }}

 

Access files from the media archive

{{ '{:id}_my.pdf' | media_pat }}

Updated: 2020-06-23