Tema filtreleri
Bir tema şablonunun kullanabildiği Liquid filtreleri.
Bu liste tema motoruna kayıtlı 158 filtredir. Listede olmayan bir filtre biticaret theme check ve yükleme için hatadır.
Filtreler anahtarlı argüman alır: image_url: width: 300.
Para
Fiyatlar kuruş cinsinden tam sayıdır; bu filtreler onları mağazanın para biçimiyle yazar.
| Filtre | Ne yapar | Örnek |
|---|---|---|
money |
Mağazanın biçimiyle tutar. | {{ product.price | money }} |
money_with_currency |
Tutar, para biriminin koduyla. | {{ cart.total_price | money_with_currency }} |
money_without_currency |
Yalnızca tutar. | {{ product.price | money_without_currency }} |
money_without_trailing_zeros |
Tutar, sondaki sıfır kuruşlar olmadan. | {{ product.price | money_without_trailing_zeros }} |
money_amount |
Biçimlenmiş tutar, simgesiz. | {{ product.price | money_amount }} |
unit_price_with_measurement |
Birim fiyatı ölçüsüyle yazar. | {{ variant.unit_price | money | unit_price_with_measurement: variant.unit_price_measurement }} |
currency_selector |
Para birimi seçimi için bir <select>. |
{{ form | currency_selector }} |
Görsel ve medya
| Filtre | Ne yapar | Örnek |
|---|---|---|
image_url |
Bir görselin istenen boyuttaki adresi (width, height, crop). |
{{ product.featured_media | image_url: width: 800 }} |
image_tag |
Bir görsel adresinden <img>. |
{{ product.featured_media | image_url: width: 400 | image_tag: loading: 'lazy' }} |
img_url |
image_url'un eski hali; boyutu adla alır. |
{{ product.featured_image | img_url: '400x' }} |
img_tag |
image_tag'in eski hali. |
{{ product.featured_image | img_url: '400x' | img_tag }} |
product_img_url, collection_img_url, article_img_url |
img_url'un kaynağa özel eski adları. |
{{ product.featured_image | product_img_url: '400x' }} |
media_tag |
Medyayı türüne göre yazar (görsel, video, dış video, model). | {{ media | media_tag }} |
video_tag |
Yüklenmiş bir videodan <video>. |
{{ section.settings.video | video_tag: controls: true }} |
external_video_url |
YouTube veya Vimeo videosunun gömme adresi. | {{ media | external_video_url: autoplay: true }} |
external_video_tag |
Dış video için <iframe>. |
{{ media | external_video_url | external_video_tag }} |
model_viewer_tag |
3B model için <model-viewer>. |
{{ media | model_viewer_tag }} |
placeholder_svg_tag |
Yer tutucu bir SVG çizim. | {{ 'product-1' | placeholder_svg_tag }} |
payment_type_img_url |
Bir ödeme türünün simgesinin adresi. | {{ type | payment_type_img_url }} |
payment_type_svg_tag |
Bir ödeme türünün simgesi, SVG olarak. | {{ type | payment_type_svg_tag }} |
Varlık ve dosya adresleri
| Filtre | Ne yapar | Örnek |
|---|---|---|
asset_url |
Temanın assets/ klasöründeki dosyanın adresi, ?v= ile. |
{{ 'base.css' | asset_url }} |
asset_img_url |
Temanın bir görsel varlığının boyutlu adresi. | {{ 'logo.png' | asset_img_url: '300x' }} |
file_url |
Mağazanın dosyalarından birinin adresi. | {{ 'katalog.pdf' | file_url }} |
file_img_url |
Mağazanın dosyalarındaki bir görselin boyutlu adresi. | {{ 'afis.jpg' | file_img_url: '600x' }} |
biticaret_asset_url |
Platformun ortak varlıklarından birinin adresi. | {{ 'option_selection.js' | biticaret_asset_url }} |
global_asset_url |
Platformun genel varlık adresi. | {{ 'x.js' | global_asset_url }} |
inline_asset_content |
Bir varlığın içeriğini sayfaya yazar (SVG, CSS, JavaScript). | {{ 'icon-cart.svg' | inline_asset_content }} |
stylesheet_tag |
Bir adresten <link rel="stylesheet">. |
{{ 'base.css' | asset_url | stylesheet_tag }} |
script_tag |
Bir adresten <script>. |
{{ 'theme.js' | asset_url | script_tag }} |
preload_tag |
Bir adresten <link rel="preload">. |
{{ 'base.css' | asset_url | preload_tag: as: 'style' }} |
Bağlantılar
| Filtre | Ne yapar | Örnek |
|---|---|---|
link_to |
Bir metinden <a>. |
{{ 'Sepet' | link_to: routes.cart_url }} |
link_to_type |
Ürün türünün koleksiyonuna bağlantı. | {{ product.type | link_to_type }} |
link_to_vendor |
Markanın koleksiyonuna bağlantı. | {{ product.vendor | link_to_vendor }} |
url_for_type |
Ürün türünün koleksiyon adresi. | {{ product.type | url_for_type }} |
url_for_vendor |
Markanın koleksiyon adresi. | {{ product.vendor | url_for_vendor }} |
link_to_tag |
Koleksiyonu bir etikete süzen bağlantı. | {{ tag | link_to_tag: tag }} |
link_to_add_tag |
Seçili etiketlere bir etiket ekleyen bağlantı. | {{ tag | link_to_add_tag: tag }} |
link_to_remove_tag |
Seçili etiketlerden birini çıkaran bağlantı. | {{ tag | link_to_remove_tag: tag }} |
highlight_active_tag |
Seçili etiketi bir <span class="active"> içine alır. |
{{ tag | highlight_active_tag }} |
within |
Bir ürün adresini koleksiyonun içine alır. | {{ product.url | within: collection }} |
sort_by |
Bir koleksiyon adresine sıralama ekler. | {{ collection.url | sort_by: 'price-ascending' }} |
customer_login_link |
Giriş sayfasına bağlantı. | {{ 'Giriş yap' | customer_login_link }} |
customer_logout_link |
Çıkış bağlantısı. | {{ 'Çıkış' | customer_logout_link }} |
customer_register_link |
Üyelik sayfasına bağlantı. | {{ 'Üye ol' | customer_register_link }} |
Çeviri, tarih ve biçim
| Filtre | Ne yapar | Örnek |
|---|---|---|
t, translate |
locales/ içinden bir metin; değişken ve çoğul (count) alır. |
{{ 'general.skip_to_content' | t }} |
date |
Bir tarihi biçimler. | {{ order.created_at | date: '%d.%m.%Y' }} |
time_tag |
Bir tarihten <time>. |
{{ order.created_at | time_tag }} |
format_address |
Bir adresi satırlarıyla yazar. | {{ customer.default_address | format_address }} |
weight_with_unit |
Gram cinsinden ağırlığı birimiyle yazar. | {{ variant.weight | weight_with_unit }} |
pluralize |
Sayıya göre tekil veya çoğul sözcük. | {{ cart.item_count | pluralize: 'item', 'items' }} |
default_pagination |
paginate nesnesinden sayfa bağlantıları. |
{{ paginate | default_pagination }} |
default_errors |
Bir formun hatalarını liste olarak yazar. | {{ form.errors | default_errors }} |
structured_data |
Bir ürünün yapılandırılmış verisi (JSON-LD içeriği). | {{ product | structured_data }} |
json |
Bir değeri JSON olarak yazar. | {{ product.variants | json }} |
highlight |
Bir metinde arama terimini işaretler. | {{ item.title | highlight: search.terms }} |
class_list |
Bir ayar değerinden CSS sınıfları. | {{ section.settings | class_list }} |
Sepet
| Filtre | Ne yapar | Örnek |
|---|---|---|
item_count_for_variant |
Sepette bir varyanttan kaç adet olduğu. | {{ cart | item_count_for_variant: variant.id }} |
line_items_for |
Sepetin bir ürüne veya varyanta ait satırları. | {{ cart | line_items_for: product }} |
Yazı tipleri
| Filtre | Ne yapar | Örnek |
|---|---|---|
font_face |
Bir yazı tipi için @font-face kuralı. |
{{ settings.type_body_font | font_face: font_display: 'swap' }} |
font_modify |
Yazı tipinin başka bir kalınlığı veya stili. | {{ settings.type_body_font | font_modify: 'weight', 'bold' }} |
font_url |
Yazı tipi dosyasının adresi. | {{ settings.type_body_font | font_url }} |
Renkler
| Filtre | Ne yapar | Örnek |
|---|---|---|
color_to_rgb |
Rengi rgb() olarak yazar. |
{{ settings.color_text | color_to_rgb }} |
color_to_hex |
Rengi onaltılık yazar. | {{ settings.color_text | color_to_hex }} |
color_to_hsl |
Rengi hsl() olarak yazar. |
{{ settings.color_text | color_to_hsl }} |
color_to_oklch |
Rengi oklch() olarak yazar. |
{{ settings.color_text | color_to_oklch }} |
color_extract |
Rengin bir bileşeni. | {{ settings.color_text | color_extract: 'red' }} |
color_modify |
Rengin bir bileşenini değiştirir. | {{ settings.color_text | color_modify: 'alpha', 0.5 }} |
color_lighten |
Rengi açar. | {{ settings.color_accent | color_lighten: 20 }} |
color_darken |
Rengi koyulaştırır. | {{ settings.color_accent | color_darken: 20 }} |
color_saturate |
Doygunluğu artırır. | {{ settings.color_accent | color_saturate: 20 }} |
color_desaturate |
Doygunluğu azaltır. | {{ settings.color_accent | color_desaturate: 20 }} |
color_mix |
İki rengi karıştırır. | {{ settings.color_text | color_mix: settings.color_background, 50 }} |
color_brightness |
Rengin algılanan parlaklığı. | {{ settings.color_background | color_brightness }} |
color_contrast |
İki rengin kontrast oranı. | {{ settings.color_text | color_contrast: settings.color_background }} |
color_difference |
İki rengin renk farkı. | {{ settings.color_text | color_difference: settings.color_background }} |
brightness_difference |
İki rengin parlaklık farkı. | {{ settings.color_text | brightness_difference: settings.color_background }} |
hex_to_rgba |
Onaltılık rengi rgba() olarak yazar; saydamlık alır. |
{{ '#1a1a1a' | hex_to_rgba: 0.5 }} |
Metin
upcase, downcase ve capitalize, mağazanın dili Türkçe ise Türkçe kurallarıyla çalışır (İ ↔ i, I ↔ ı).
| Filtre | Ne yapar | Örnek |
|---|---|---|
append |
Sona ekler. | {{ product.handle | append: '.jpg' }} |
prepend |
Başa ekler. | {{ product.title | prepend: '★ ' }} |
upcase |
Büyük harfe çevirir. | {{ product.vendor | upcase }} |
downcase |
Küçük harfe çevirir. | {{ product.vendor | downcase }} |
capitalize |
İlk harfi büyütür. | {{ product.type | capitalize }} |
camelize |
Sözcükleri birleştirip baş harflerini büyütür. | {{ 'ana-menu' | camelize }} |
handle, handleize |
Metni tanıtıcıya çevirir. | {{ product.title | handleize }} |
escape, h |
HTML karakterlerini kaçırır. | {{ section.settings.heading | escape }} |
escape_once |
Kaçırılmış olanları yeniden kaçırmadan kaçırır. | {{ page.title | escape_once }} |
strip_html |
HTML etiketlerini siler. | {{ product.description | strip_html }} |
strip_newlines |
Satır sonlarını siler. | {{ product.description | strip_newlines }} |
newline_to_br |
Satır sonlarını <br> yapar. |
{{ cart.note | newline_to_br }} |
strip, lstrip, rstrip |
Baştaki ve sondaki, yalnızca baştaki, yalnızca sondaki boşluğu siler. | {{ cart.note | strip }} |
squish |
Boşluk dizilerini tek boşluğa indirir ve kırpar. | {{ product.title | squish }} |
truncate |
Metni karakter sayısına göre keser. | {{ product.title | truncate: 40 }} |
truncatewords |
Metni sözcük sayısına göre keser. | {{ product.description | strip_html | truncatewords: 20 }} |
replace, replace_first, replace_last |
Bir parçayı değiştirir: hepsini, ilkini, sonuncusunu. | {{ product.title | replace: '-', ' ' }} |
remove, remove_first, remove_last |
Bir parçayı siler: hepsini, ilkini, sonuncusunu. | {{ product.title | remove: '!' }} |
split |
Metni bir ayraçla listeye böler. | {{ product.tags | join: ',' | split: ',' }} |
slice |
Bir metnin veya listenin parçası. | {{ product.title | slice: 0, 10 }} |
size |
Metnin veya listenin uzunluğu. | {{ product.tags | size }} |
url_encode |
Adres için kodlar. | {{ search.terms | url_encode }} |
url_decode |
Adres kodlamasını çözer. | {{ 'a%20b' | url_decode }} |
url_escape |
Bir adresteki geçersiz karakterleri kodlar. | {{ link.url | url_escape }} |
url_param_escape |
Bir sorgu değerini kodlar. | {{ search.terms | url_param_escape }} |
base64_encode, base64_decode |
Base64 kodlar, çözer. | {{ 'metin' | base64_encode }} |
base64_url_safe_encode, base64_url_safe_decode |
Adrese uygun Base64 kodlar, çözer. | {{ 'metin' | base64_url_safe_encode }} |
md5, sha1, sha256 |
Metnin özeti. | {{ customer.email | sha256 }} |
hmac_sha1, hmac_sha256 |
Bir anahtarla HMAC. | {{ 'metin' | hmac_sha256: 'anahtar' }} |
default |
Değer boşsa yerine geçeni verir. | {{ section.settings.heading | default: shop.name }} |
Sayılar
| Filtre | Ne yapar | Örnek |
|---|---|---|
plus, minus |
Toplar, çıkarır. | {{ cart.item_count | plus: 1 }} |
times, divided_by |
Çarpar, böler. | {{ product.price | times: 2 }} |
modulo |
Bölümden kalan. | {{ forloop.index | modulo: 2 }} |
abs |
Mutlak değer. | {{ -5 | abs }} |
ceil, floor, round |
Yukarı, aşağı, en yakına yuvarlar. | {{ 4.6 | round }} |
at_least, at_most |
Değeri bir alt, bir üst sınırla tutar. | {{ cart.item_count | at_most: 99 }} |
Listeler
| Filtre | Ne yapar | Örnek |
|---|---|---|
first, last |
İlk, son öğe. | {{ product.images | first }} |
join |
Öğeleri bir ayraçla birleştirir. | {{ product.tags | join: ', ' }} |
map |
Her öğenin bir alanı. | {{ collection.products | map: 'title' | join: ', ' }} |
where |
Bir alanı verilen değerde olan öğeler. | {{ collection.products | where: 'available', true }} |
reject |
where'in tersi. |
{{ collection.products | reject: 'available', false }} |
find |
Koşula uyan ilk öğe. | {{ product.variants | find: 'available', true }} |
find_index |
Koşula uyan ilk öğenin sırası. | {{ product.variants | find_index: 'available', true }} |
has |
Koşula uyan bir öğe var mı. | {{ product.variants | has: 'available', true }} |
sort |
Sıralar; bir alana göre de. | {{ collection.products | sort: 'price' }} |
sort_natural |
Büyük küçük harfe bakmadan sıralar. | {{ collection.all_tags | sort_natural }} |
reverse |
Sırayı ters çevirir. | {{ product.images | reverse }} |
uniq |
Yinelenenleri atar. | {{ collection.products | map: 'vendor' | uniq }} |
compact |
Boş öğeleri atar. | {{ collection.products | map: 'featured_image' | compact }} |
concat |
İki listeyi birleştirir. | {{ product.tags | concat: collection.all_tags }} |
sum |
Öğeleri veya bir alanlarını toplar. | {{ cart.items | sum: 'quantity' }} |
Kabul edilen ama çıktı vermeyenler
Bu filtreler tanınır, yani denetimden geçer, ama bugün boş metin yazar: payment_button, payment_terms, avatar, login_button, metafield_tag, metafield_text.
Hata ayıklama
| Filtre | Ne yapar | Örnek |
|---|---|---|
inspect |
Değerin iç görünümünü yazar. | {{ product.tags | inspect }} |
type |
Değerin motordaki türünü yazar. | {{ product.price | type }} |