Sha256: db256566f372ee990f9304a0a3d83d96aa1389fc71f6998e66b47ee22ddb6fee

Contents?: true

Size: 690 Bytes

Versions: 44

Compression:

Stored size: 690 Bytes

Contents

---
title: Various uses of the with_scope tag
---
{% assign begin_date  = '2012-06-01 00:00:00' %}
{% assign end_date    = '2012-06-10 23:59:59' %}
{% assign prices      = '5.0,5.5' | split: ',' | map: 'to_f' %}

{% with_scope date.gte: begin_date, date.lte: end_date, city: /Kansas/, state.ne: 'Illinois', tags: 'awesome', tags.nin: 'bad', price.in: prices, order_by: 'price.desc' %}
events={{ contents.events.count }}.
{% endwith_scope %}

{% with_scope tags.in: 'awesome', order_by: 'price.desc' %}
first event={{ contents.events.first.place }}.
{% endwith_scope %}

{% assign featured = false %}

{% with_scope featured: featured %}
bands={{ contents.bands.count }}.
{% endwith_scope %}

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
locomotivecms_wagon-3.0.0 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-3.0.0.rc0 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-3.0.0.beta2 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.4.1 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.4.0 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.4.0.rc2 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.4.0.rc1 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.3.0 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.3.0.rc1 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.2.0 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.2.0.rc3 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.2.0.rc2 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.2.0.rc1 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.2.0.beta1 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.1.1 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.1.0 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.1.0.rc5 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.1.0.rc4 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.1.0.rc3 spec/fixtures/default/app/views/pages/filtered.liquid.haml
locomotivecms_wagon-2.0.1 spec/fixtures/default/app/views/pages/filtered.liquid.haml