Sha256: 081b6f70d1c0ddbed1e9f211deb0972e1eb743c662f937a97c0831a3cf1020bc

Contents?: true

Size: 660 Bytes

Versions: 4

Compression:

Stored size: 660 Bytes

Contents

---
title: Search testing page
published: true
---
{% extends index %}

{% block 'main' %}
.row

  {% search_for params.query, per_page: 10, page: params.page %}

  %p {{ search.total_entries }} elements found.

  %ul
    {% for result in search.results %}
    %li
      {% if result.title %}
      %a{ href: "/{{result.fullpath}}" } {{ result.title }}
      {% else %}
      %a{ href: "/projects/{{result._slug}}" } {{ result.label }}
      {% endif %}
    {% endfor %}

  {% if search.total_pages > params.page %}
  %p
    %a{ href: "?page={{ params.page | plus: 1 }}&query={{ params.query }}" } Next page
  {% endif %}

  {% endsearch_for %}

{% endblock %}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
locomotivecms-search-0.3.6 spec/wagon/app/views/pages/search.liquid.haml
locomotivecms-search-0.3.5 spec/wagon/app/views/pages/search.liquid.haml
locomotivecms-search-0.3.4 spec/wagon/app/views/pages/search.liquid.haml
locomotivecms-search-0.3.3 spec/wagon/app/views/pages/search.liquid.haml