Skip to content
Windfarer edited this page Dec 11, 2014 · 7 revisions

###navbar {% for item in g.navigation %}

  • {{ item.nav }}
  • {% endfor %}

    ###posts list

    ###posts list with pagination {% set booklet = stapler(pages,paged=g.paged,perpage=g.perpage) %} {% for page in booklet.pages %}

  • {{ page.date_formatted }}
    {{ page.description }}
  • {% endfor %}
    {% if booklet.max and booklet.paged %}
        {% set current_flip_page = booklet.paged %}
        {% set has_next_flip_page = current_flip_page < booklet.max %}
        {% set has_prev_flip_page = current_flip_page > 1 %}
        
    
        {% if has_prev_flip_page %}
            <a rel="prev" href="{{ glue({'paged':current_flip_page-1}) }}">Prev Page</a>
        {% endif %}
        {% if has_next_flip_page %}
            <a rel="next" href="{{ glue({'paged':current_flip_page+1}) }}"> Next Page</a>
        {% endif %}
    {% endif %}
    

    ###barcode_scanner用法示例 分类列表

      {% set categories = barcode_scanner(pages,'category') %} {% for category,count in categories.iteritems() %}
    • {{category}}
    • {% endfor %}
    标签云
    <div>
        {% set categories = barcode_scanner(pages,'category') %}
        {% for tag in categories.iterkeys() %}
        <a href="{{ '/'+tag }}">{{ tag }}</a>
        {% endfor %}
    </div>
    

    Clone this wiki locally