Themes
Theme objects
The objects a theme template can use, and their fields.
This page lists every Liquid object available in theme templates along with its fields. The list comes directly from the theme engine's source code: the fields shown here are the exact fields the engine exposes. Prices are whole numbers in kuruş; format them using the money filters.
On every page
| Object | Description | Example |
|---|---|---|
shop |
The store. | {{ shop.name }} |
settings |
Global theme settings (config/settings_data.json). |
{{ settings.color_background }} |
request |
Current HTTP request context. | {{ request.locale.iso_code }} |
routes |
Storefront route paths. | {{ routes.cart_url }} |
template |
The template currently being rendered. | {{ template.name }} |
theme |
Active theme metadata. | {{ theme.name }} |
localization |
Available countries and languages. | {{ localization.language.iso_code }} |
cart |
The visitor's shopping cart. | {{ cart.item_count }} |
customer |
The signed-in customer; empty when signed out. | {% if customer %}{{ customer.first_name }}{% endif %} |
collections |
Store collections; also accessible by handle. | {{ collections.all.products_count }} |
all_products |
Look up a product by handle (up to 20 products per page). | {{ all_products['mug'].title }} |
linklists |
Navigation menus, keyed by handle. | {% for link in linklists['main-menu'].links %} |
pages |
Content pages, keyed by handle. | {{ pages['about-us'].content }} |
blogs |
Blogs; also accessible by handle. | {% for article in blogs['news'].articles limit: 3 %} |
articles |
Blog posts, keyed by blog/post handle. |
{{ articles['news/first-post'].title }} |
images |
Store image files, keyed by filename. | {{ images['logo.png'] | image_url: width: 200 }} |
content_for_header |
Platform <head> scripts and styles; required in theme.liquid. |
{{ content_for_header }} |
content_for_layout |
Rendered template output; required in theme.liquid. |
{{ content_for_layout }} |
canonical_url |
Canonical URL of the current page. | <link rel="canonical" href="{{ canonical_url }}"> |
page_title |
Page title for <title>. |
<title>{{ page_title }}</title> |
page_description |
Meta description for the page. | {{ page_description | escape }} |
page_image |
Social sharing image for the page. | {{ page_image | image_url: width: 1200 }} |
current_page |
Current page number during pagination. | {{ current_page }} |
current_tags |
Active tag filters on a collection or blog page. | {% if current_tags contains tag %} |
handle |
Handle of the current page's primary resource. | {{ handle }} |
powered_by_link |
Platform attribution link. | {{ powered_by_link }} |
country_option_tags, all_country_option_tags |
<option> elements for country selectors. |
<select>{{ country_option_tags }}</select> |
recommendations |
Product recommendations (populated inside /recommendations/products). |
{% if recommendations.performed %} |
closest |
Resources nearest to the current page: closest.product, closest.collection, closest.page, closest.blog, closest.article. |
{{ closest.product.title }} |
scripts is defined but empty, and additional_checkout_buttons is always false.
Each template also exposes its own primary object globally: product on product pages, collection on collection pages, page on content pages, blog on blog pages, blog and article on article pages, search on search pages, gift_card on gift card pages, and predictive_search in predictive search results.
Sections and blocks
| Object | Fields |
|---|---|
section |
id, settings, blocks, index, index0, location |
block |
id, type, settings, blocks, biticaret_attributes |
<h2>{{ section.settings.heading | escape }}</h2>Objects that tags provide
| Object | Where | Fields |
|---|---|---|
forloop |
Inside {% for %} |
name, length, parentloop, index, index0, rindex, rindex0, first, last |
tablerowloop |
Inside {% tablerow %} |
length, col, col0, row, index, index0, rindex, rindex0, first, last, col_first, col_last |
paginate |
Inside {% paginate %} |
current_page, current_offset, items, pages, page_size, page_param, parts, previous, next |
form |
Inside {% form %} |
id, posted_successfully?, errors, set_as_default_checkbox, password_needed and the form's own fields |
Form errors (form.errors): messages, translated_fields, size.
{%- paginate collection.products by 24 -%}
{%- if paginate.pages > 1 %}{{ paginate | default_pagination }}{% endif -%}
{%- endpaginate -%}Store
shop: id, name, description, email, phone, domain, permanent_domain, url, secure_url, currency, money_format, money_with_currency_format, locale, taxes_included, address, password_message, customer_accounts_enabled, customer_accounts_optional, accepts_gift_cards, enabled_payment_types, enabled_currencies, published_locales, enabled_locales, policies, privacy_policy, refund_policy, shipping_policy, terms_of_service, subscription_policy, contact_information, legal_notice, products_count, collections_count, types, vendors, search_types, metafields, brand.
Policy (shop.privacy_policy and the others): id, title, body, url, handle.
request: design_mode, visual_preview_mode, host, origin, path, page_type, locale.
routes: root_url, account_url, account_login_url, account_logout_url, account_register_url, account_recover_url, account_addresses_url, account_profile_url, storefront_login_url, collections_url, all_products_collection_url, search_url, predictive_search_url, cart_url, cart_add_url, cart_change_url, cart_clear_url, cart_update_url, product_recommendations_url.
<a href="{{ routes.cart_url }}">{{ 'general.cart' | t }} ({{ cart.item_count }})</a>template: name, suffix, directory.
theme: id, name, role.
localization: available_countries, available_languages, country, language, market.
Country (localization.country): iso_code, name, continent, currency, unit_system, popular?, available_languages, market.
Market (localization.market): id, handle, name, metafields.
Products
product: id, handle, title, type, vendor, description, content, tags, template_suffix, url, created_at, published_at, updated_at, price, price_min, price_max, price_varies, compare_at_price, compare_at_price_min, compare_at_price_max, compare_at_price_varies, available, variants, variants_count, has_only_default_variant, first_available_variant, selected_variant, selected_or_first_available_variant, options, options_with_values, options_by_name, featured_image, featured_media, images, media, collections, metafields, category, gift_card?, selling_plan_groups, selected_selling_plan, selected_selling_plan_allocation, selected_or_first_available_selling_plan_allocation, requires_selling_plan, quantity_price_breaks_configured?.
A product can have at most 2,048 variants. product.variants and product | json return the first 250. variants_count, prices, option values and ?variant= cover all variants, and /products/<product>.js lists every variant.
The subscription and volume-pricing fields on products, variants and cart lines (selling_plan_…, requires_selling_plan, quantity_price_breaks…) exist on the objects for theme compatibility, but always return empty values because the platform does not sell subscriptions.
{%- assign current = product.selected_or_first_available_variant -%}
<h1>{{ product.title }}</h1>
<p>
{{ current.price | money }}
{%- if current.compare_at_price > current.price %} <s>{{ current.compare_at_price | money }}</s>{% endif %}
</p>Variant (product.variants): id, title, sku, barcode, available, selected, matched, url, price, compare_at_price, unit_price, unit_price_measurement, inventory_management, inventory_policy, inventory_quantity, image, featured_image, featured_media, options, options_with_values, option1, option2, option3, requires_shipping, taxable, weight, weight_unit, weight_in_unit, metafields, product, position, quantity_rule, store_availabilities, incoming, next_incoming_date, selected_selling_plan_allocation, selling_plan_allocations, requires_selling_plan, quantity_price_breaks, quantity_price_breaks_configured?.
Option (product.options_with_values): name, position, values, selected_value.
Option value: id, name, selected, available, variant, product_url, swatch.
Image (product.featured_image, product.images): id, alt, src, width, height, aspect_ratio, presentation, media_type, position, product_id, variants, attached_to_variant?, preview_image, url.
Focal point (image.presentation.focal_point): x, y.
Media (product.media): id, alt, media_type, position, preview_image, aspect_ratio, host, external_id, duration, sources.
Video URL (a setting of type video_url): id, type.
Collections
collection: id, handle, title, description, url, published_at, updated_at, template_suffix, image, featured_image, metafields, products, products_count, all_products_count, all_tags, all_types, all_vendors, tags, current_type, current_vendor, default_sort_by, sort_by, sort_options, filters, next_product, previous_product.
next_product and previous_product are populated on product pages accessed via /collections/<collection>/products/<product>.
Filter (collection.filters, search.filters): label, param_name, type, operator, presentation, values, active_values, inactive_values, true_value, false_value, min_value, max_value, range_max, url_to_remove.
Filter value: active, value, label, count, param_name, image, swatch, url_to_add, url_to_remove.
Content and menus
page: id, handle, title, content, author, url, published_at, created_at, updated_at, template_suffix, metafields.
blog: id, handle, title, url, articles, articles_count, all_tags, tags, comments_enabled?, moderated?, next_article, previous_article, template_suffix, metafields.
blog.articles is sorted newest first and works with paginate. At /blogs/<blog>/tagged/<tag> it contains only posts matching that tag, and blog.tags holds the selected tags. next_article (older) and previous_article (newer) are populated on individual post pages.
article: id, handle, title, author, content, excerpt, excerpt_or_content, image, tags, url, published_at, created_at, updated_at, template_suffix, user, comments, comments_count, comments_enabled?, moderated?, comment_post_url, metafields.
Blog comments are not supported: comments is empty, comments_count is 0, and comments_enabled? is false.
Author (article.user): name, first_name, last_name, account_owner, bio, email, homepage, image. The name fields are populated from the post's author field; the remaining fields are empty.
{%- paginate blog.articles by 6 -%}
{%- for article in blog.articles -%}
<h2><a href="{{ article.url }}">{{ article.title }}</a></h2>
{{ article.excerpt_or_content | strip_html | truncate: 160 }}
{%- endfor -%}
{{ paginate | default_pagination }}
{%- endpaginate -%}Menu (linklists['<handle>']): handle, title, id, links, levels.
Link (linklist.links): title, url, handle, links, levels, active, current, child_active, child_current, type, object, data_sharing_opt_out_icon.
{%- for link in section.settings.menu.links -%}
<li><a href="{{ link.url }}"{% if link.current %} aria-current="page"{% endif %}>{{ link.title }}</a></li>
{%- endfor -%}Cart
cart: items, item_count, empty?, items_subtotal_price, original_total_price, total_price, checkout_charge_amount, total_discount, discount_applications, cart_level_discount_applications, discounts, attributes, note, currency, requires_shipping, taxes_included, duties_included, total_weight, token, company_location.
Line item (cart.items): id, key, quantity, product, product_id, variant, variant_id, title, sku, vendor, url, url_to_remove, image, options_with_values, properties, original_price, price, original_line_price, line_price, final_price, final_line_price, line_level_total_discount, total_discount, discount_allocations, line_level_discount_allocations, discounts, tax_lines, message, unit_price, unit_price_measurement, error_message, components, gift_card, requires_shipping, taxable, grams, selling_plan_allocation, fulfillment, fulfillment_service, successfully_fulfilled_quantity.
Company location (cart.company_location, when shopping for a company): id, name, company_name, payment_terms, tax_exempt.
Customers
customer: id, email, first_name, last_name, name, phone, accepts_marketing, accepts_sms_marketing, has_account, tax_exempt, b2b?, tags, orders_count, total_spent, default_address, addresses, addresses_count, orders, last_order, store_credit_account, gift_cards, metafields.
Customer order (customer.orders): id, name, order_number, created_at, cancelled, cancelled_at, financial_status, fulfillment_status, total_price, cash_total_price, installment_count, installment_markup, customer_url, shipping_method (title, delivery_method), delivery_method (shipping, pickup or local_delivery), pickup_location (for store-pickup orders: name, address, instructions, ready_in), payment_terms, attributes (the order's cart attributes; for gift orders: Hediye for gift toggle, Hediye notu for gift note, and Fiyatları gizle for hide prices).
Address (customer.default_address, shop.address): id, first_name, last_name, name, company, address1, address2, street, city, province, province_code, zip, country, country_code, phone, summary.
Search
search: performed, terms, results, results_count, types, filters, sort_by, default_sort_by, sort_options.
predictive_search: performed, terms, types, resources (products, collections, pages, articles, queries).
recommendations: performed, performed?, products, products_count, intent.
Gift cards
gift_card (on the /gift_cards/<token> page): balance, initial_value, currency, enabled, expired, expires_on, last_four_characters, code, url, qr_identifier, pass_url, customer, product, send_on, message, recipient, template_suffix, properties, created_at.
Gift card customer (gift_card.customer): name.
Store credit (customer.store_credit_account): balance, currency.
Metafields
The metafields property on product, variants, collection, blog, article, customer and shop is accessed by namespace and key. page.metafields is empty.
value returns the typed value: a number, boolean, date or string, or a parsed object for json and rating fields. For reference types (product_reference, variant_reference, collection_reference, page_reference, blog_reference, article_reference, file_reference, metaobject_reference and list.* variants), value resolves to the referenced object (or a list of objects); missing references are omitted. file_reference resolves to an image or video media object. customer_reference is always empty on the storefront so one customer's record is never exposed to anyone else.
Metafield: value, type, namespace, key, list?.
{{ product.metafields.custom.care_guide.value }}app (in app blocks): metafields, the app's own metafields.
Metaobjects
The store's metaobject types (Ayarlar > Özel veriler, Settings > Custom data in the admin) are exposed via metaobjects.<type>: metaobjects.<type>.<entry handle> returns a single entry, and metaobjects.<type>.values returns the type's entries (up to 250). Only active entries are visible on the storefront; drafts are omitted.
Metaobject entry (metaobject): system.
Entry system fields (metaobject.system): handle, type, id, url.
Each field of an entry is exposed as a metafield under its key: .value returns the typed value, and outputting the field directly prints its value. url is populated only when the type has web pages enabled.
The value of a metaobject_reference metafield is the entry itself; for list.metaobject_reference it is a list of entries. Entries of a type with web pages enabled render at /pages/<type handle>/<entry handle> using templates/metaobject/<type>.json (or .liquid), where the entry is exposed as the metaobject object. Without that template, the route returns 404.
{% for book in metaobjects.book.values %}{{ book.title.value }}{% endfor %}
{{ metaobjects.book.dune.author }}
{% for b in product.metafields.custom.books.value %}<a href="{{ b.system.url }}">{{ b.title }}</a>{% endfor %}Setting values
Color (a setting of type color): red, green, blue, alpha, hue, saturation, lightness, chroma, color_space, rgb, rgba, oklch, oklcha.
Color scheme (a setting of type color_scheme): id, settings.
Font (a setting of type font_picker): family, fallback_families, style, weight, baseline_ratio, system?, system, variants.