PHPackages                             surda/back-button - 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. surda/back-button

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

surda/back-button
=================

Back button control for Nette Framework

v2.0.0(5y ago)041MITPHPPHP &gt;=8.0

Since Oct 5Pushed 5y ago1 watchersCompare

[ Source](https://github.com/surda/back-button)[ Packagist](https://packagist.org/packages/surda/back-button)[ Docs](http://surani.cz)[ RSS](/packages/surda-back-button/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (8)Versions (4)Used By (0)

Back Button
===========

[](#back-button)

[![Build Status](https://camo.githubusercontent.com/88a76c44fe660b8271f61d0ee3cb669b2fe28f9e6c63c0e399cabc0b996f786c/68747470733a2f2f7472617669732d63692e6f72672f73757264612f6261636b2d627574746f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/surda/back-button)[![Licence](https://camo.githubusercontent.com/fbcd822c41be8f9fc633dc4144da6b5ac1f069b9bae8145e2657320638e8d660/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f73757264612f6261636b2d627574746f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/surda/back-button)[![Latest stable](https://camo.githubusercontent.com/069e563ff3946fccf3ca9900b4f165c1c4464dc490affacee4ca682ca77b7a03/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73757264612f6261636b2d627574746f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/surda/back-button)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)

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

[](#installation)

The recommended way to is via Composer:

```
composer require surda/back-button

```

After that you have to register extension in config.neon:

```
extensions:
    backButton: Surda\BackButton\BackButtonExtension
```

Configuration
-------------

[](#configuration)

Default

```
backButton:
    defaultPresenterLink: 'default'
    templates:
        default: bootstrap4.default.latte
        secondary: bootstrap4.secondary.latte
```

List of all configuration options:

```
backButton:
    defaultPresenterLink: 'default'
    useAjax: false
    template: path/to/your/latte/file.latte
    # or
    templates:
        default: path/to/your/latte/file.latte
        foo: path/to/your/latte/foo.latte
        ...
```

Usage
-----

[](#usage)

### Presenter

[](#presenter)

```
use Nette\Application\UI\Presenter;
use Surda\BackButton\InjectBackButton;

abstract class ProductPresenter extends Presenter
{
    use InjectBackButton;
}
```

### Template

[](#template)

Source page (e.g. Product:default) add link to default.latte

```
Detail
```

Destination page (Product:detail) add component to detail.latte

```
{control backButton}
```

### Destination

[](#destination)

Presenter

```
$this->template->destination = $this->link('detail', $id);
```

Latte

```
{control backButton destination:$destination}
```

### Select control template file

[](#select-control-template-file)

Default template

```
{control backButton} or {control backButton default}
```

Set control template by type of template (see config.neon)

```
{control backButton templateType}
```

### Reset

[](#reset)

Reset persistent parameter `$destination` in URL `...?destination=%2Fproduct`

```
Products
```

or all (defined) persistent parameters

```
Products
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~269 days

Total

3

Last Release

1878d ago

Major Versions

v1.4.0 → v2.0.02021-03-25

PHP version history (3 changes)v1.3.0PHP &gt;=7.1

v1.4.0PHP &gt;=7.1,&lt;8.0

v2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8d497ef90ca9ed180419b5ab29857be10e88d0614cf01c94b0f2ab5094de45d?d=identicon)[surda](/maintainers/surda)

---

Top Contributors

[![surda](https://avatars.githubusercontent.com/u/588663?v=4)](https://github.com/surda "surda (8 commits)")

---

Tags

nettecontrol

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/surda-back-button/health.svg)

```
[![Health](https://phpackages.com/badges/surda-back-button/health.svg)](https://phpackages.com/packages/surda-back-button)
```

###  Alternatives

[contributte/di

Extra contrib to nette/di

465.8M18](/packages/contributte-di)[contributte/menu-control

Menu control for Nette framework

29108.6k1](/packages/contributte-menu-control)[carrooi/nette-menu

Menu control for Nette framework

2950.0k1](/packages/carrooi-nette-menu)[contributte/event-dispatcher

Best event dispatcher / event manager / event emitter for Nette Framework

292.4M19](/packages/contributte-event-dispatcher)[bileto/cronner

Simple tool which helps with maintenance of cron tasks.

752.1k](/packages/bileto-cronner)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
