Questions tagged [liquid]

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. Liquid has been in production use at Shopify since 2006 and is now used by many other hosted web applications.

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 to for usage in Ruby on Rails web applications and integrates seamlessly as a plugin but it also works excellently as a stand alone library.

In addition, Liquid is also used as the main templating engine on GitHub pages through the Jekyll static site generator.

3995 questions
1
vote
2 answers

Images and videos in product slider on Shopify site

I require some help in creating a product slider in Shopify that allows you to add images and videos. At the moment the slider is working fine but I am having issues adding product videos to the slider. From what I have read you can use the alt tag…
Pedz
  • 442
  • 1
  • 10
  • 30
1
vote
1 answer

Regex in Shopify filters

I am trying to remove or replace ?page=2 from Shopify link with regex. Is regex not working here?
Gradar
  • 113
  • 1
  • 5
1
vote
2 answers

How to check for a product within a Shopify collection using Liquid?

I have a products object: assign rel_products = collection.products How can I check for a specific product within this object? By id preferably. I'm doing this check so I can continue in a for loop: {% if rel_products contains related_product.id %} …
f7n
  • 1,476
  • 3
  • 22
  • 42
1
vote
1 answer

Displaying the third image from a shopify product

I'm pretty new to Shopify, but I can't seem to reconcile why these two snippets produce the same output (namely, the products always use the featured image, instead of the third image like I want them to) Before: {% assign featured_image = false…
bmuk
  • 121
  • 5
1
vote
1 answer

Grouping collection by category

I have the following collection in my jekyll project: portfolio |- portrait |-- daniel.md |-- george.md |- nature |-- national-park.md |- food |-- lasagna.md |-- buritto.md |-- pizza.md What I want is to render a portfolio page grouping my…
1
vote
4 answers

Output link to "parent page"?

I have a collection _colletion. In there is a file _collection/path/topic.md and a folder _collection/path/topic/ that includes lots of .md files with content. The permalinks for these files are /path/topic and /path/topic/file-x - so a parent page…
janpio
  • 10,645
  • 16
  • 64
  • 107
1
vote
1 answer

Azure API Managment - Split Query Parameter value

I'm trying to publish a backend SOAP service as a REST service through Azure API Management. I already managed to publish it, but now I want to transform my backend POST operation to a GET. I use a liquid template to create my XML request message…
Tim D'haeyer
  • 584
  • 6
  • 19
1
vote
2 answers

How do you add custom id attributes to div elements in Shopify Boundless theme?

I need to target a specific div in Shopify. I'm using Boundless Theme. I want to add a custom id attribute to this specific div. How can I do this? The div I need to target is the 3rd div with class "product-item grid__item…
Pretendo
  • 29
  • 1
  • 4
1
vote
1 answer

Shopify - How to show/hide Cart {{ note }} depending on if it is left empty or not in Email Notification

I have a {{ cart.note }} section added on my Cart pages, which I'm using for in-house Purchase Orders. For customer email notifications I'd like this field to display instead of the default Invoice number, but only if that field is filled out (if…
jhawes
  • 2,354
  • 3
  • 24
  • 34
1
vote
0 answers

How to embed html with references (js, css) in .md file?

I'm an absolute beginner working with Jekyll sites and have currently the following issue: I want to embed a calendar into my index.md (start page). The index.md only contains the yaml frontmatter so far. The calendar consists of a html-file…
Nina
  • 11
  • 2
1
vote
0 answers

Get record count based on filtered view of entity list in Dynamics 365 Portal?

I am working on a new web page in Dynamics 365 Customer Self-Service Portal that will display an entity list of invoices with filtering enabled on the entity list. One of the requirements is to display the number of invoices as well as a sum of all…
AK3800
  • 2,138
  • 3
  • 23
  • 28
1
vote
2 answers

Shopify - Is it possible to filter by 'Vendor'

it seems Shopify only allows for filtering by tags. If you want to filter by Vendor (which is a standard Shopify Field) you first need to create tags with the same name and manually use those tags in the filter sidebar. Is this correct? Seems very…
user2029890
  • 2,493
  • 6
  • 34
  • 65
1
vote
1 answer

Jekyll ruining JSON file. Arrows ("=>") instead of ":"

I wanted to make a chopleth with d3.js in a Jekyll draft. But somehow Jekyll is changing my JSON file from {"type":"FeatureCollection", "features":[{"type":"Feature", "id":"01", to {"type"=>"FeatureCollection", "features"=>[{"type"=>"Feature",…
MikolajM
  • 300
  • 1
  • 13
1
vote
1 answer

Jekyll for loop can't work as expected

I created a new page, there was a for loop to display the list of posts, but it can't work as expcted and here is my code:
1
vote
2 answers

How to get the current product's variant ID?

How do I get the variant ID of a product I'm currently viewing? For example, if I'm viewing a product at example.com/collections/bowls/product-name?variant=123456789 I need to get the variant's ID number. I've tried {{ variant.id }} but it does not…
Dustin
  • 4,314
  • 12
  • 53
  • 91