The Theme object is representing the current theme of the shop, it contains the follow attributes:


Object Fields

FieldData TypeDescription
theme.keyStringReturns the key of the theme
theme.settingsObjectReturns an object of settings of the theme.
theme.settings.hover_styleStringSelected hover style of the theme.
theme.settings.categories_collapsedBooleanCategory list will be collapsed by default when it's enabled.
theme.settings.mobile_categories_collapsedBooleanCategory list will be collapsed in mobile view by default when it's enabled.
theme.settings.image_fillBooleanCrop product images to fill into the image view when it's enabled.
theme.settings.hide_share_buttonsBooleanHide social media sharing button in detail pages.
theme.settings.enabled_quick_cartBooleanEnable to this setting to show "instant add to cart" feature for all products listing view.

Code Example

{% if theme.key == "swanky" and theme.settings.hover_style == "swanky.box" %}
    // Do somethings
{% endif %}