Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt
Include Page
TERMS:Liquid Syntax
TERMS:Liquid Syntax

...

  • Objects: The value of the field you want to access. Always written in two pairs of curly braces. Access a field from a layer, and be aware that objects in Picturepark always start with data: data.layer.text

  • Filters: Change the output, e.g., append text, uppercase. Always added with a pipe to the objects inside the curly braces. Append Picturepark to the value: | append " Picturepark". You can add multiple filters to one value , so you can to translate, truncate, and append in one statement: {{data.layer.text | translate | truncate | append }}

  • Tags: For logic operations, e.g., if the field has a value. Always written in a pair of curly braces with a percentage symbol. Check if field exists: {% if data.layer.field %} {% endif %}

...

The Picturepark display pattern uses Liquid objects for the field values. You can access all information directly. 

  1. Data.Schema.Field ( Data.Schema.Field ) will result in "Value1 (Value2)"

  2. Data.Schema.Field will result in "Value"

...


As tagboxes store multiple values (tags) you must use a liquid tag, the for loop:
{% for item in Data.SchemaIAm.FieldAffectedFromSchemaIAm %} {{ item.FieldnameFromReferencedSchema.Language}} {% endfor%}

Display Pattern Liquid Filters

Liquid Filters are supported, but the C# naming convention must be respected. Find here an extensive list of possible filters, some of which may not work in Picturepark. 

(lightbulb) Look here for more filters: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers#standard-filters

{{data.schema.Textfield | truncate: 5, '' }}

  • truncates down to 5 characters

{{data.schema.Textfield | truncate: 5, '...' }}

  • truncates down to 5 characters and append three dots

{{data.schema.Textfield | upcase }}

  • converts the values to uppercase

{{data.schema.Textfield | append: ' VIT' }}

  • appends VIT to the values

{{data.fileMetadata.fileName | replace: data.imageMetadata.fileExtension , "" }}

  • replaces the file extionsion in the original file name with nothing aka removes the file extension

...

  •  capitalizes every word

{{data.schema.Textfield | downcase }}

  •  converts the values to lowercase

{{data.schema.Textfield | prepend: 'Picturepark' }}

...

If you find a specific filter you want to use but which that is not working, please contact support@picturepark.com.

...

  • Displays the correct translated value of the field, if available, even without display pattern translations.

...

  • Displays the date value in your computers computer's regional setting time zone. 

Date Format Syntax

You can format the date to different formats, the syntax is like strf.

  • %m > month as 01..12

  • %b > month as Jan…Dec

  • %Y > year with century as 2021

  • %y > year without century as 21

Code Block
{{data.xmpMetadata.xmp.createDate | date: "%Y-%m"}}
Output: 2021-06
{{data.xmpMetadata.xmp.createDate | date: "%Y"}}
Output: 2021
{{data.xmpMetadata.xmp.createDate | date: "%m, %Y"}}
Output: 06, 2021