Global Object

The following objects can be used and accessed from any file in your theme, and are defined as global objects, or global variables:

page_title

The page_title object returns the title of the current page. Returns the title of a Product, or Page set in their respective Admin pages.

{{ page_title }}
			
About Us
			

current_page

current_page returns the number of the page you are on when browsing through paginated content. It can be used outside the paginate block.

{{ page_title }} - Page: {{ current_page }}
			
Summer Collection - Page: 1
			

template

template returns the name of the template used to render the current page, with the .liquid extension omitted.

{{ template }}.liquid
			
home.liquid
			

canonical_url

canonical_url object returns the canonical URL for the current page. The canonical URL is the page's "default" URL with any URL parameters removed.

For products and variants, the canonical URL is the default product page with no collection or variant selected. For example, for a product in a collection with a variant selected:

{{ canonical_url }}
			
http://store_name.easy.co/products/asus-zenbook-3-i7-7500u-16gb-512gb-w10h
			

page_description

page_description object returns the description of the product, collection, or page that is being rendered. Descriptions for these items can be set in your EasyStore control panel.

<meta name="description" content="{{ page_description }}" />
			
<meta name="description" content="This is my About Us page!" />
			

cart

cart object returns your store's cart. More info ›

shop

shop object contains information about your store. More info ›

collection

collection object returns all the collections in your store. More info ›

<ul>
 {% for product in collection.products %}
   <li>
    <a href="{{ product.url }}"> {{ product.title }} </a>
   </li>
 {% endfor %}
</ul>
				

contents

contents object returns all the contents in your store. More info ›

<ul>
 {% for footer_link in contents.footer.links %}
   <li>
    <a href="{{ link.url }}"> {{ link.title }} </a>
   </li>
 {% endfor %}
</ul>
					

copyright

copyright object returns the sentence of the copyright input. This item can be set in your EasyStore control panel > Settings > General.

{{ copyright }}
					
Copyright © 2016 Cup.co. E-commerce Powered by EasyStore
					

is_desktop

is_desktop object returns the current browser user agent device type whether is desktop or others.

{% if is_desktop %}
   {{ page_title }}
{% endif %}
						
Summer Collection
						

is_tablet

is_tablet object returns the current browser user agent device type whether is tablet or others.

{% if is_tablet %}
   {{ page_title }}
{% endif %}
							
Summer Collection
							

is_mobile

is_mobile object returns the current browser user agent device type whether is mobile or others.

{% if is_mobile %}
   {{ page_title }}
{% endif %}
								
Summer Collection
								

is_other

is_other object returns the current browser user agent unknown device type.

{% if is_other %}
   {{ page_title }}
{% endif %}
									
Summer Collection
									
icon-accounticon-add-newicon-add-storeicon-appicon-appleicon-archiveicon-arrowdownicon-ascicon-bookicon-cancelicon-cart-addonicon-checkouticon-cherryicon-collectionicon-comfirmicon-confirmicon-couponicon-creditsicon-currencyicon-dashboardicon-discounticon-disintegrateicon-domainicon-dscicon-duplicateicon-editicon-emailicon-exclamation-triangleicon-exporticon-eyeicon-eye-slashicon-fullscreenicon-fullscreen-closeicon-generalicon-gifticon-gridicon-hddicon-helpicon-importicon-infoicon-integrationicon-invoiceicon-likeicon-listicon-locationicon-logouticon-new-tabicon-not-secureicon-optionicon-ordericon-outline-arrowdownicon-pageicon-paymenticon-plusicon-posicon-pricingicon-printericon-producticon-product-sumicon-product-sum-xicon-redirecticon-reporticon-reseticon-searchicon-secureicon-settingicon-shippingicon-staricon-storeicon-switch-storeicon-tagicon-taxesicon-templateicon-themeicon-tickicon-trashicon-unarchiveicon-uploadicon-user-tagicon-usersicon-weighticon-wholesale