Skip to content

Instantly share code, notes, and snippets.

View ugifractal's full-sized avatar

sugiarto ugifractal

View GitHub Profile
{{ page_content }}
@ugifractal
ugifractal / output.html
Created February 23, 2011 02:00
liquid output on template
<html>
<head>
</head>
<body>
{{ page_content }}
</body>
</html>
{% assign nama = 'udin' %}
{% judul = 'selamat datang di web kami' %}
<html>
<head>
<title>{{ judul }}</title>
</head>
<body>
</body>
</html>
{% if condition %}
...
{% else %}
...
{% endif %}
{% if current_product %}
Produk tersedia
{% else %}
Produk tidak tersedia
{% endif %}
{{site.name}} # menampilkan nama web
{{site.domain_name}} # menampilkan nama domain
{% for page in site.latest_pages %}{{page.title}}{%endfor%} #menampilkan daftar judul halaman terbaru
{% for product in site.latest_products %}{{product.title}}{%endfor%} #menampilkan daftar judul produk terbaru
{{current_page.title}} #menampilkan judul halaman
{{current_page.uname}} #menampilkan nama unik untuk akses URL
{{current_product.title}} #untuk menampilkan judul
{{current_product.name}} #untuk menampilkan nama produk
{{current_product.description}} #untuk menampilkan deskripsi produk
{{current_product.image_thumb_url}} #untuk mendapatkan URL gambar produk ukuran thumbnail
{{current_product.image_medium_url}} #untuk mendapatkan URL gambar produk ukuran medium
{% twitter_widget nama_akun_twitter %}
# contoh:
{% twitter_widget 'webmuapp' %}