Skip to main content
A block doesn’t have to print on every document. In its Visibility tab you can print it only for some orders: payment details only when the order is paid, a customs declaration only for orders shipping abroad, a wholesale note only for B2B customers. The block stays in your template and Foliant decides, order by order, whether it prints.

Before you start

Conditions are part of the visual editor, which depends on your plan. Templates that print one document for all the selected orders don’t have a Visibility tab: their blocks always print.
  1. Select the block on the page and open Visibility.
  2. Set Show this block to When the order matches conditions.
  3. Click Add condition, choose What to check, How to compare, and the values.
  4. Add more conditions if you need them (up to 10). With more than one, choose Which conditions must match: All of these or Any of these.
A condition without values isn’t applied until you choose at least one.

What you can check

For tags, order details and items you can choose include any of, include all of or include none of. Tags also offer contain the text, which matches part of a tag in any case: vip matches VIP-gold. Other fields use is or is not. For anything the fields above don’t cover:
  1. Set Show this block to When a Liquid condition is true.
  2. In Liquid condition, write the part that goes inside {% if … %}, as one expression without tags. For example:
Money amounts are in cents: order.total_price >= 10000 means 100.00. Until you write a condition, the block is always shown. If Liquid can’t read the condition, the field tells you. See Conditional content in Liquid for operators and examples.

Check the result with real orders

Below the conditions, the inspector says whether the block is Shown for the preview order or Hidden for the preview order, and which condition hid it. On the page, a hidden block stays visible as a dashed strip, for example “Payment & notes: hidden for this order (Only when: Payment status is Paid)”, so you can still select it. Choose another order in the preview order picker above the page to see the block hide and show. The Sample orders (such as Unpaid, with a note or B2B buyer) are made for this. See Preview, paper size and zoom.

Good to know

  • The block’s name in the inspector sums up its rule, for example Only when: Payment status is Paid, Only when all 2 conditions match or Never shown. Blocks with conditions show a Conditions badge in the Blocks outline.
  • Hide (never print), under a block’s handle on the page, is the quick way to stop a block printing without deleting it.
  • A block inside a hidden Columns block is hidden too.
  • The fields are the same as in “Who gets this template?” on a template’s settings page, which picks a whole template for some orders instead. See Use a template for some orders only.
  • Market needs Foliant’s permission to read your markets. If it’s missing, open Foliant again from your Shopify admin and approve the new permission.