PHPackages                             heimrichhannot/contao-newsnavigation-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. heimrichhannot/contao-newsnavigation-bundle

ActiveContao-bundle[Utility &amp; Helpers](/categories/utility)

heimrichhannot/contao-newsnavigation-bundle
===========================================

A bundle to provide a navigation between news articles

3.0.1(1y ago)31.7kLGPL-3.0-or-laterPHPPHP ^8.1

Since Oct 10Pushed 1y ago5 watchersCompare

[ Source](https://github.com/heimrichhannot/contao-newsnavigation-bundle)[ Packagist](https://packagist.org/packages/heimrichhannot/contao-newsnavigation-bundle)[ Docs](https://github.com/heimrichhannot/contao-newsnavigation-bundle)[ RSS](/packages/heimrichhannot-contao-newsnavigation-bundle/feed)WikiDiscussions v3 Synced today

READMEChangelog (5)Dependencies (13)Versions (9)Used By (0)

Contao Newsnavigation Bundle
============================

[](#contao-newsnavigation-bundle)

[![](https://camo.githubusercontent.com/f0d8c0c1b8cb1db91333710a5c9a3ed15887e9f138f7e39f70b856aa4d7669e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6865696d7269636868616e6e6f742f636f6e74616f2d6e6577736e617669676174696f6e2d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-newsnavigation-bundle)[![](https://camo.githubusercontent.com/3808e37ab3f09e3f6b43edcc81b7d47182ce82a52d6208ac5e77eeaa2eff2205/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6865696d7269636868616e6e6f742f636f6e74616f2d6e6577736e617669676174696f6e2d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-newsnavigation-bundle)[![](https://camo.githubusercontent.com/a5529d2e17e22c1f4725aea6ed07f48b17f24822a174ae05622de680eda681c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6865696d7269636868616e6e6f742f636f6e74616f2d6e6577736e617669676174696f6e2d62756e646c652e737667)](https://packagist.org/packages/heimrichhannot/contao-newsnavigation-bundle)[![](https://camo.githubusercontent.com/7a8a54e7ee075f9a33edda53b4e146cabdd7b14478a2ca64d17080aaff0f3b3d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230352d627269676874677265656e2e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/7a8a54e7ee075f9a33edda53b4e146cabdd7b14478a2ca64d17080aaff0f3b3d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230352d627269676874677265656e2e7376673f7374796c653d666c6174)

A [contao](https://contao.org/de/) extension to provide a simple navigation between news articles. It add template variables to go from one news article to the next or the previous article. News article order is calculated by time property.

[![screenshot.png](docs/screenshot.png)](docs/screenshot.png)

Features
--------

[](#features)

- add Template variables to NewsReaderModule to jump between news articles
- customize article navigation with custom filters

Installation
------------

[](#installation)

Install via composer:

```
composer require heimrichhannot/contao-newsnavigation-bundle

```

Usage
-----

[](#usage)

The bundle provides two new variables for news reader templates: `nextArticle` and `previousArticle`.

Twig example:

```
{% if previousArticle|default %}

        {{ previousArticle.label }}

{% endif %}

{% if nextArticle|default %}

        {{ nextArticle.label }}

{% endif %}
```

HTML5 example:

```
