2017 © Pedro Peláez
 

library carew-next

Plugin for carew, add next_document and previous_document functions

image

gnugat/carew-next

Plugin for carew, add next_document and previous_document functions

  • Thursday, April 9, 2015
  • by gnupat
  • Repository
  • 1 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Carew - next

This Carew plugin adds two new functions:, (*1)

  • next_document()
  • previous_document()

With these, you'll be able to automatically have links pointing to the next and previous pages:, (*2)

{% block content_main %}
    {{ carew.document.body|raw }}

    <ul>
        {% set next = next_document(carew.posts, carew.document) %}
        {% if next %}
        <li>Next: <a href="{{ render_document_path(next) }}">{{ next.title }}</a></li>
        {% endif %}

        {% set previous = previous_document(carew.posts, carew.document) %}
        {% if previous %}
        <li>Previous: <a href="{{ render_document_path(previous) }}">{{ previous.title }}</a></li>
        {% endif %}
    <ul>
{% endblock %}

Installation

Use Composer:, (*3)

composer require "gnugat/carew-next:~1.0"

Then register the plugin:, (*4)

engine:
    extensions:
        - Gnugat\CarewNext\NextExtension

Further documentation

You can see the current and past versions using one of the following:, (*5)

You can find more documentation at the following links:, (*6)

The Versions

09/04 2015

dev-master

9999999-dev

Plugin for carew, add next_document and previous_document functions

  Sources   Download

MIT

The Requires

 

carew

09/04 2015

v1.0.0

1.0.0.0

Plugin for carew, add next_document and previous_document functions

  Sources   Download

MIT

The Requires

 

carew