> ## Documentation Index
> Fetch the complete documentation index at: https://foliant-help.iforiti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Liquid में शर्त वाली सामग्री

> if, unless और case से टेम्पलेट के कुछ हिस्से सिर्फ़ कुछ ऑर्डर के लिए प्रिंट करें, और जानें कि Liquid कौन-सी तुलनाएँ सपोर्ट करता है।

Liquid टेम्पलेट का कोई हिस्सा सिर्फ़ तब प्रिंट कर सकता है जब कोई बात सही हो: भुगतान किए गए ऑर्डर पर "Paid" स्टैम्प, गिफ़्ट मैसेज होने पर गिफ़्ट मैसेज, विदेश भेजे जाने वाले ऑर्डर के लिए कस्टम्स विवरण। विज़ुअल एडिटर में इसके बजाय ब्लॉक का **दृश्यता** टैब इस्तेमाल करें ([कोई ब्लॉक सिर्फ़ कुछ ऑर्डर के लिए दिखाएँ](https://foliant-help.iforiti.com/hi/template-editor/block-conditions.md) देखें)। यह लेख कोड टेम्पलेट, **कस्टम Liquid** ब्लॉक और ब्लॉक के **Liquid शर्त** विकल्प के लिए है।

## if, elsif और else

```liquid theme={null}
{% if financial_status == 'paid' %}
  <p class="stamp">PAID</p>
{% elsif financial_status == 'partially_paid' %}
  <p>Partly paid. {{ 'total_due' | t }}: {{ total_price | minus: total_paid | money }}</p>
{% else %}
  <p>Payment pending</p>
{% endif %}
```

## unless

`unless`, `if` का उल्टा है:

```liquid theme={null}
{% unless customer.tax_exempt %}
  {% include 'vat_breakdown' %}
{% endunless %}
```

## case

```liquid theme={null}
{% case shipping_address.country_code %}
  {% when 'US', 'CA' %}
    <p>Ships within North America</p>
  {% when 'GB' %}
    <p>Ships within the UK</p>
  {% else %}
    <p>International shipment</p>
{% endcase %}
```

## तुलनाएँ

| ऑपरेटर | मतलब | उदाहरण |
| - | - | - |
| `==` / `!=` | बराबर है / बराबर नहीं है | `fulfillment_status == 'fulfilled'` |
| `>` `<` `>=` `<=` | से बड़ा / से छोटा | `total_price >= 10000` |
| `contains` | टेक्स्ट में शामिल है, या सूची में शामिल है | `tags contains 'Wholesale'` |
| `and` / `or` | शर्तों को जोड़ें | `pickup_in_store? or shipping_lines.size == 0` |
| `blank` | खाली या मौजूद नहीं | `note != blank` |

Liquid `and` और `or` को दाएँ से बाएँ पढ़ता है और इसमें कोष्ठक नहीं होते। जटिल नियमों के लिए `if` टैग को एक-दूसरे के अंदर रखें।

## आम उदाहरण

सिर्फ़ तब, जब ऑर्डर में नोट हो:

```liquid theme={null}
{% if note != blank %}<p>{{ note | escape }}</p>{% endif %}
```

सिर्फ़ 100.00 से ज़्यादा के ऑर्डर के लिए (रकम सेंट में होती है):

```liquid theme={null}
{% if total_price >= 10000 %}<p>Free gift included</p>{% endif %}
```

सिर्फ़ VIP टैग वाले ग्राहकों के लिए:

```liquid theme={null}
{% if customer.tags contains 'VIP' %}<p>Thank you for being a VIP!</p>{% endif %}
```

सिर्फ़ EU से बाहर भेजे जाने वाले ऑर्डर के लिए:

```liquid theme={null}
{% unless shipping_address.member_of_eu %}…customs details…{% endunless %}
```

सिर्फ़ ड्राफ़्ट ऑर्डर के लिए:

```liquid theme={null}
{% if is_draft_order? %}…{% endif %}
```

## विज़ुअल ब्लॉक पर Liquid शर्तें

ब्लॉक की **Liquid शर्त** वह हिस्सा है जो `{% if … %}` के अंदर आता है: एक एक्सप्रेशन, बिना टैग के। जैसे `total_price >= 10000 and customer.tags contains 'VIP'`। आपके टाइप करते समय ही Foliant इसे नमूना ऑर्डर पर जाँचता है, और अगर Liquid इसे पढ़ नहीं पाता तो आपको बताता है।

## ध्यान रखें

* टेक्स्ट की तुलना में बड़े-छोटे अक्षरों का फ़र्क पड़ता है: `'vip'`, `'VIP'` से मेल नहीं खाता। विज़ुअल एडिटर में **टेक्स्ट शामिल है** वाली टैग शर्तें बड़े-छोटे अक्षरों पर ध्यान नहीं देतीं।
* `financial_status` और `fulfillment_status` छोटे अक्षरों में, अंडरस्कोर के साथ होते हैं: `paid`, `partially_refunded`, `unfulfilled`, `partially_fulfilled`।
* प्रीव्यू के ऑर्डर पिकर में **नमूना ऑर्डर** और अपने हाल के ऑर्डर से शर्तें जाँचें। [प्रीव्यू, पेपर साइज़ और ज़ूम](https://foliant-help.iforiti.com/hi/template-editor/preview-paper-and-zoom.md) देखें।

## संबंधित लेख

* [कोई ब्लॉक सिर्फ़ कुछ ऑर्डर के लिए दिखाएँ](https://foliant-help.iforiti.com/hi/template-editor/block-conditions.md)
* [ऑर्डर ऑब्जेक्ट और आम वेरिएबल](https://foliant-help.iforiti.com/hi/template-editor/liquid-order-variables.md)
* [टेम्पलेट में रकम और मुद्रा](https://foliant-help.iforiti.com/hi/template-editor/liquid-money-and-currency.md)
* [टेम्पलेट का कोड एडिट करें](https://foliant-help.iforiti.com/hi/template-editor/code-editor.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.