Introduction


We'll try our best to make this list as complete as possible, but we figured it would be better to start small and add to it over time.

Compiling this list won't be possible without input from the Siteglide Forum. Please let us know if you find any tags while migrating and need to find an equivalent. We'll try and add them somewhere in the List.

Where possible, we'll suggest tag conversions in the following format:

BC Tag => Siteglide Tag

We'll break this down into the following sections:

  • Tags with direct equivalents
  • Tags with similarities
  • Tags with no direct equivalents
  • Save-blocking deprecated Liquid Syntax

A note on Liquid Syntax


This is covered elsewhere in more detail, but for now it's helpful to remember these basic rules for Liquid syntax. Instead of using real tags and values, for these examples we'll use placeholders to describe what each element means.

Tags

  • {% tag_name_here %} - Tags, signified by curly braces and "percent" characters, are used for logic and commands.

Parameters 

  • {% tag_name_here, parameter_1: value, parameter_2: value %} - Parameters allow you to change settings for tags. 

Output

  • {{variable_name_to_be_output}} - Output, signified by double curly braces, outputs the value specified into the file/Page. 

Filters

  • {{variable_name_to_be_output | filter: "filter_parameter_1", "filter_parameter_2" }} Here a filter is used to modify output.
  • {% assign filtered_variable = old_variable | filter %} - Here a filter is used to modify a newly assigned variable. 

For the purposes of this article, we'll refer to both output and tags as tags, to keep things simple. Elsewhere in this documentation, we'll aim to distinguish between tags and output.

Tags with Direct Equivalents

  • {tag_pagecontent} => {{content_for_layout}} - Inside a Page Template, fetch the main Page body.

Tags with Similarities

  • {{globals}} => {{context}}  - Learn more here.
  • {{globals.visitor.deviceClass}} => {{context.device.device_type}}  ("desktop" matches "desktop", but we have not yet tested all device types).

Tags with no Direct Equivalents

Coming soon.

Save-blocking Deprecated Liquid Syntax

Open Square

Example CLI Error: Validation failed: Body syntax is invalid (Liquid syntax error: Expected id but found open_square in "{{rootURL.['Root URL']}}")

this.[‘title with spaces’] has become this[‘title with spaces’]. This can make it harder to chain more than one property with spaces in the name. However, it shouldn’t be necessary now.

  • this.['Field name with spaces'] => this['Field name with spaces']

Nested Liquid curly braces

  • {% if {{variable}} > 0 %}<!-- Do something -->{% endif %} => {% if variable > 0 %}<!-- Do something -->{% endif %}

A Liquid if statement allows you to compare variables in its condition. The new syntax means you need to write less, but will mean migrated code needs the inner curly braces removed.

Did this answer your question?