Skip to main content
Skip table of contents

Display Pattern: File Metadata in Layer Fields


You may want to show the file extension or original filename (standard file metadata) in calculated text fields in a layer. You can make those available to the search and have some basic information shown.

{{ | replace: ".", " " | upcase}}

Setup in Picturepark

  • Layer: Corporate Layer

  • Fields

    • Text Field; calculated value switched on

You add a text field to a schema, then switch on “calculated value” and add Liquid Syntax code. When the field does not display it cannot be resolved, either because the code is wrong or the values are not available.

Find Non-Layer Fields

The calculated field can not access all values, there is some limitation like linked list items. However, file metadata is available, but you have to choose the correct file type to access it:

  • Schemas > Files > Image as imageMetadata

  • Schemas > Files > Video as videoMetadata

  • Schemas > Files > Document as documentMetadata

Access Non-Layer Fields

The values from imageMetadata, videoMetadata etc. (e.g. "JPEG" as value in fileExtension) are not part of the layer where the text field with the calculated value is added. So to get those values you have to use: outerData (~data outside of this Layer).

Display Pattern

// Layer Fields - Translated Text
{{data.basicInformation.title.en | replace: ".", " " | upcase }}
{{data.basicInformation.title | translate | replace: ".", " " | upcase }}

// Non-Layer Fields
{{ | replace: ".", " " | upcase}}
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.