Variables

.all

List of all active collections.

TYPE
CONSTRAINTS
n/a
PRESENCE
always, but could be empty

Examples

CODE{% for collection in collections.all %}
  {{ collection.name }}<br/>
{% endfor %}
OUTPUTNotebooks
Tablets
...

.by_ref

Access a collection by its reference name.

TYPE
collection object
CONSTRAINTS
n/a
PRESENCE
if reference name matches, null otherwise

Examples

CODEcollections.by_ref.notebooks.name
OUTPUTNotebooks

.by_tag

Access a set of collections sharing a tag.

TYPE
CONSTRAINTS
n/a
PRESENCE
always, but can be an empty array

Examples

CODE{% for collection in collections.by_tag.primary %}
  {{ collection.name }}<br/>
{% endfor %}
OUTPUTComputers
Photography
...

Variable Dump

Copy and paste the below HTML into any template page, to see all collection data dumped to your page. You can then simply remove the unnecessary fields and other elements, and format the remaining fields however necessary to achieve the desired look and feel.

<style> .thedump .name{ background-color:#3A5FCD; color:white; padding:0.5em; font-weight:bold; } .thedump .code{ background-color:#888888; color:white; padding:0.5em; } .thedump .out{ background-color:white; color:#555555; padding:0.5em; border-bottom:1px solid #CCCCCC; margin-bottom:1em; } .thedump .code pre{ padding:0; margin:0; font-size:1.1em; } </style> <div class="thedump"> <div class="name">All Collections</div> <div class="code"><pre>&#123;&#37; for collection in collections.all &#37;&#125; &lt;p&gt; id: &#123;&#123; collection.id &#125;&#125;&lt;br/&gt; reference: &#123;&#123; collection.ref &#125;&#125;&lt;br/&gt; name: &#123;&#123; collection.name &#125;&#125; url: &#123;&#123; collection | collection_url &#125;&#125; link: &#123;&#123; collection | collection_link: collection.name &#125;&#125; &lt;/p&gt; &#123;&#37; endfor &#37;&#125;</pre></div> <div class="out"> {% for collection in collections.all %} <p> id: {{ collection.id }}<br/> reference: {{ collection.ref }}<br/> name: {{ collection.name }}<br/> url: {{ collection | collection_url }}<br/> link: {{ collection | collection_link: collection.name }} </p> {% endfor %} </div> <div class="name">Collection By Reference</div> <div class="code"><pre>&#123;&#123; collections.by_ref.notebooks.name &#125;&#125;</div> <div class="out">{{ collections.by_ref.notebooks.name }}</div> <div class="name">Collections By Tag</div> <div class="code"><pre>&#123;&#37; for collection in collections.by_tag.primary &#37;&#125; &lt;p&gt; id: &#123;&#123; collection.id &#125;&#125;&lt;br/&gt; reference: &#123;&#123; collection.ref &#125;&#125;&lt;br/&gt; name: &#123;&#123; collection.name &#125;&#125; url: &#123;&#123; collection | collection_url &#125;&#125; link: &#123;&#123; collection | collection_link: collection.name &#125;&#125; &lt;/p&gt; &#123;&#37; endfor &#37;&#125;</pre></div> <div class="out"> {% for collection in collections.by_tag.primary %} <p> id: {{ collection.id }}<br/> reference: {{ collection.ref }}<br/> name: {{ collection.name }}<br/> url: {{ collection | collection_url }}<br/> link: {{ collection | collection_link: collection.name }} </p> {% endfor %} </div> </div>