Questions tagged [liquid-template]

Liquid is an open-source template language created by Shopify and written in Ruby. It is the backbone of Shopify themes and is used to load dynamic content on storefronts. This tag should be used for questions relating to Liquid templating systems (for example interactions between Shopify's theme template files). Use the related [liquid] tag for generic liquid questions.

Liquid is a templating engine for creating web pages. From the Liquid website:

Liquid is an extraction from the e-commerce system Shopify. Shopify powers many thousands of e-commerce stores which all call for unique designs. For this we developed Liquid which allows our customers complete design freedom while maintaining the integrity of our servers.

Liquid has been in production use since June 2006 and is now used by many other hosted web applications.

It was developed for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

Liquid has been in production use at Shopify since 2006, and is also used as the main templating engine on GitHub pages through the Jekyll static site generator.

57 questions
2
votes
0 answers

JSON to JSON conversion using Liquid templates as maps in Azure Logic Apps

this is my JSON source file format { "BookingId":2, "BookingReferenceNumber":"A15", "BookingIndex":3 } This is Liquid file for mapping { "Id":{{content.BookingId}}, "refNumber":"{{content.BookingReferenceNumber}}", …
2
votes
1 answer

Why would a previously stable and working Liquid template fail after the most recent Azure API Management upgrade?

We have an Azure API Management endpoint that receives requests in the following format: { "messageType": "EVENT", "eventData": { "installedApp": { "installedAppId": "xxx", "locationId": "yyy" }, …
Jude Fisher
  • 11,138
  • 7
  • 48
  • 91
2
votes
2 answers

Liquid - How do I setup liquid template locally

How do I set up Liquid Templates locally? Suppose, I have this liquid template and I want to run this locally. {%- assign deviceList = content.devices | Split: ', ' -%} { "fullName": "{{content.firstName | Append: ' ' | Append:…
SK.
  • 4,174
  • 4
  • 30
  • 48
1
vote
0 answers

Variable is defined but not used (But used below)

Shopify indicates an error on the top line of the code that my variable is defined but not use can anyone teach me what's the logic behind it because I used the variable below {% assign compareAtPriceMax = product.compare_at_price_max | times: 1.16…
Honey_G
  • 11
  • 2
1
vote
2 answers

Twilio Liquid Template cant access array

I am running into an issue where i use {{flow.data.Schedule | split:"~"}} to create an array with the variable name "schedule". I am trying to access the first value in the array but using {{flow.variables.schedule[0]}} and it comes out as…
1
vote
2 answers

XML to JSON - Liquid Mapping - 2 level XML repeating records - Logic Apps

Looking for your feedback on my liquid template mapping script, I cannot parse 2nd level order within in product. I am new to the syntax trying to parse as per the expected output. Looking for your suggestions on how to fix, and handle second-level…
SMSVikasK
  • 23
  • 5
1
vote
0 answers

HTML/Liquid Code isn't showing all objects?

The image and image_caption are not shown when I try to use this, heading and text_on_image work just fine Color changing also doesnt work like this Been looking for the errors for a while now but I just can't fix it {% schema %} { …
Janexx
  • 31
  • 2
1
vote
0 answers

Liquid error: Error - Illegal template path

I am facing this issue in c# code. While using liquid templates include formula. string liquidTemplateContent = System.IO.File.ReadAllText("wwwroot/template/example.liquid"); LocalFileSystem fileSys = new…
Kedar Ghadge
  • 112
  • 9
1
vote
0 answers

3Scale custom policy matching path param in the URI

I am using 3Scale's edge limiting policy to impose rate limiting for my API and having the following endpoints GET /v1/user GET /v1/user/{name} GET /v1/user/{name}/{organization} For the first endpoint configuring rate limit is pretty straight…
1
vote
0 answers

JSON to JSON Liquid template transformation

I am very new to this Azure Liquid templates. I'm parsing JSON to JSON using Dot Liquid. I have "userDefinedFields" under "data" is an array of 4 fields i.e., Reason, Number, Bill and Key. In JSON, sometimes "userDefinedFields" may have 4 fields or…
timz_123
  • 435
  • 1
  • 9
  • 47
1
vote
1 answer

How to no-index specific pages on shopify? Don't want to use "contains" example for shopify, can I just type "="? And what denotes as the handle?

Shopify says to utilize the following sample to noindex a specific page in shopify. To exclude a specific page, paste the following code in the section: {% if handle contains 'page-handle-you-want-to-exclude' %}
KaraSEO
  • 11
  • 2
1
vote
0 answers

Liquid Mapping for conversion from xml to json

I have this xml part of Data:
F22
  • 11
  • 3
1
vote
0 answers

How to setup a local dev environment for non-Shopify Liquid projects?

The Issue I'm trying to create a theme for a client on a Shopify-like platform called EasyStore. After having looked through their documentation and developer area, they don't seem to have robust support for theme building yet. They have no staging…
1
vote
0 answers

Multiple Two numbes and compare with another Liquid Tags

I am trying to multiple a and b and compare if the product is more than c. How do i do it in liquid tags. I tried the following but it is not working. { "a": {% if {{5|times:3}} > 10 %} 10 {% else %} 20 {% endif %} } Ideally it should print the…
Karanam Krishna
  • 365
  • 2
  • 16
1
vote
1 answer

How to Remove comma for the last object in nested for loop?

I want to remove the comma from the last object in nested for loop: [{% for item1 in articles.results.entities %} {% for item2 in articles1.results.entities %} {% if item1.knowledgearticleid != item2.knowledgearticleid %} { …
1
2 3 4