Snippets

Team Headjam Creative BC Liquid Snippets

You are viewing an old version of this snippet. View the current version.
Revised by Headjam Creative 5c591ec
{%comment -%} You can edit the list template from Layouts/CustomerOrders/list.html {%endcomment -%}
{% capture ordersOutput -%}{module_order filter="all" collection="orders"}{% endcapture-%}
{% if this.orders.items -%}
<table class="data-table order-list collapsing-table" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>Order</th>
            <th>Date</th>
            <th>Status</th>
            <th>Ammount</th>
        </tr>
    </thead>
    <tbody>
       {{ordersOutput}}                                         
    </tbody>
</table>        
{% else -%}
<div style="text-align: center;font-size: 14px;">You don't have any orders so far. <a href="/shop.html" class="read-more">Go shopping <span>&rarr;</span></a></div>
{% endif %}
<h3>Archive</h3>
{tag_blogpostarchive,60 template="" collection="blogpostarchive"}
{%comment -%} Suppress the output of the tag_blogpostarchive by using the template="" syntax and capture the data rendered by the tag using the collection="blogpostarchive" syntax {%endcomment -%}

<div class="BlogPostArchive">
    <ul>
        {%comment -%}  Use liquid to loop through the posts archive collected by the tag_blogpostarchive {%endcomment -%}
        {% for item in this.blogpostarchive.items -%}
        <li><a href="{{item.url}}" title="{{item.year}}-{{item.month}}">{{item.month}} {{item.year}} ({{item.count}})</a></li>
        {% endfor -%}
    </ul>
</div>
{%comment -%} suppress the output of the tag_blogrecentpost by using the template="" syntax and capture the data rendered by the tag using the collection="blogrecentposts" syntax  {%endcomment -%}
{tag_blogrecentpost,10 template="" collection="blogrecentposts"}

<div class="BlogRecentPost">
    <ul>
        {%comment -%}  Use liquid to loop through the posts collected by the tag_blogrecentpost  {%endcomment -%}
        {% for post in this.blogrecentposts.items -%}
        <li><a href="{{post.url}}" title="{{post.title}}">{{post.title}}</a></li>
        {% endfor -%}
    </ul>
</div>
<script type="text/javascript" src="/CatalystScripts/Java_DynMenusSelectedCSS.js"></script>
{module_menu menuId="1336130" template="" collection="menu_1336130"}

<div id="cat_1336130_divs">
    <ul id="nav_1336130">
        {% for item in this.menu_1336130.items -%}
        <li><a href="{{item.url}}">{{item.label}}</a></li>
        {% endfor -%}
        {%comment -%} use globals.user variable to verify if user is logged in  {%endcomment -%}
        {% if globals.user.isLoggedIn == 'true' %}
            <li>{module_logout}</li>
        {% endif -%}
    </ul>
</div>
<script type="text/javascript">catSetSelectedCSSItem('nav_1336130');</script>
{module_webapps render="collection" id="Venues" filter="all" resultsPerPage="999" collection="venueList" template=""}

{% for venue in venueList.items -%}
  {% if this.['itemid'] == venue.['itemid'] -%}
    {% assign currentIndex = forloop.index0 %}
    {% assign lastIndex = forloop.length | minus: 1 %}
  {% endif -%}
{% endfor -%}

{% if currentIndex == 0 -%}
  {% assign prevItem = lastIndex %}
{% else -%}
  {% assign prevItem = currentIndex | minus: 1 %}
{% endif -%}

{% if currentIndex == lastIndex -%}
  {% assign nextItem = 0 %}
{% else -%}
  {% assign nextItem = currentIndex | plus: 1 %}
{% endif -%}

{module_webapps render="item" id="Venues" filter="item" itemId="{{ venueList.items[prevItem].['itemid'] }}" resultsPerPage="1" template="/Layouts/WebApps/Venues/card.nextItem.tpl"}
{module_webapps render="item" id="Venues" filter="item" itemId="{{ venueList.items[nextItem].['itemid'] }}" resultsPerPage="1" template="/Layouts/WebApps/Venues/card.prevItem.tpl"}
{{ globals.user.firstname }}&rsquo;{% if globals.user.firstname | slice: -1, 1 == 's' -%}s{% endif %} Item.
{{this.salePrice | split:'.' | first}}<sup>{{this.salePrice | split:'.' | last}}</sup>
{%comment -%}
    Suppress the output of the module using template="" syntax. Also, capture the data in a collection using collection="shoppingCart" syntax. 
    This way you can customize without JS the layout of the cart summary
{%endcomment -%}

{module_shoppingcartsummary template="" collection="shoppingCart"}
{%comment -%} Use Liquid conditionals for your layout logic {%endcomment -%}

{% if this.shoppingCart.itemCount > 0 -%}
<a href="/OrderRetrievev2.aspx">Shopping Cart ({{this.shoppingCart.itemCount}} items)</a>
{% else -%}
<a href="/OrderRetrievev2.aspx">Shopping Cart (0)</a>
{% endif -%}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.