PHPackages                             avolle/cakephp-title - 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. avolle/cakephp-title

ActiveLibrary

avolle/cakephp-title
====================

A title plugin for CakePHP

2.0.1(1y ago)0644MITPHPPHP ^8.1CI failing

Since Jan 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mentisy/cakephp-title)[ Packagist](https://packagist.org/packages/avolle/cakephp-title)[ Docs](https://avolle.com)[ RSS](/packages/avolle-cakephp-title/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

Title plugin for CakePHP
========================

[](#title-plugin-for-cakephp)

[![PHPStan](https://camo.githubusercontent.com/af448da87e55bac7d375d138c9df7ef5d47f1d6ac14511a2c8f79ba19fa375b4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230372d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/phpstan/phpstan)[![Title Plugin CI](https://github.com/mentisy/cakephp-title/workflows/Title%20Plugin%20CI/badge.svg)](https://github.com/mentisy/cakephp-title/workflows/Title%20Plugin%20CI/badge.svg)

A plugin to automatically generate titles for web pages using routes from the HTTP request url.

This plugin will automatically generate a working title using values such as the request's `controller`, `action`, `prefix` if there is one and the `app name` if you provide one.

You can set our own format by configuring the Component when loading it in your application.

Version map:
------------

[](#version-map)

PluginBranchCakePHP2.xmain5.x^8.11.x1.x4.x^7.4 | ^8.0### Configuration options:

[](#configuration-options)

- `format` - How the generated title should be formatted. See valid placeholders below.
    - Default format: `{{prefix} - }{{controller} - }{{action} - }{{displayField}}{ &raquo; {appName}}`
    - Example generated: Admin - Files Types - View - PDF » CakePHP application
- `appName` - Your application's name. Used as replacement for the `appName` placeholder.
- `ignoreIndex` - If true, and the requested action is `index`, then the action will not be placed in the title
- `showDisplayFieldOnView` - If true, the display field value (e.g. the files type's name) will be placed in the title.

### Valid placeholders:

[](#valid-placeholders)

- `appName` - Will be replaced by the app's name, if you provide one in the component's configuration
- `controller` - Will be replaced by the requested controller
- `action` - Will be replaced by the requested action
- `prefix` - Will be replaced by the requested prefix, if there is one.
- `displayField` - If your action stores an entity variable in the view, the component attempts to get the entity's display field value to display in the title
    - For example: If you have a table called Tools and the display field is the tool's name, it will place the tool's name in the title.
    - The display field value is not fetched on its own from the database. It attempts to find a view var in which to get the value from.
    - Please note that the entity variable must be named using cake's convention. A Tool entity variable must be `$tool`. A FilesType entity must be named `$filesType`.

### Usage:

[](#usage)

#### In your Application.php file:

[](#in-your-applicationphp-file)

```
    // On the top, with your other use statements
    use Avolle\Title\Plugin as TitlePlugin;

    /**
     * Boostrap method. Load required plugins
     *
     * @return void
     */
    public function bootstrap(): void
    {
        $this->addPlugin(TitlePlugin::class, ['autload' => true]);
    }

```

#### In your AppController.php file:

[](#in-your-appcontrollerphp-file)

```
    /**
     * Initialization hook method.
     *
     * @return void
     * @throws \Exception
     */
    public function initialize(): void
    {
        parent::initialize();

        $this->loadComponent('Avolle/Title.Title', [
            'appName' => 'Title App',
            'format' => '{{prefix} - }{{controller} - }{{action} - }{{displayField}}{ &raquo; {appName}}',
            'ignoreIndex' => false,
            'showDisplayFieldOnView' => true,
        ]);
    }

```

#### In your layout file

[](#in-your-layout-file)

```

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance46

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% 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 ~302 days

Total

6

Last Release

422d ago

Major Versions

1.x-dev → 2.0.02023-10-14

PHP version history (2 changes)1.0.0PHP &gt;=7.4

2.0.0PHP ^8.1

### Community

Maintainers

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

---

Top Contributors

[![mentisy](https://avatars.githubusercontent.com/u/8539693?v=4)](https://github.com/mentisy "mentisy (16 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/avolle-cakephp-title/health.svg)

```
[![Health](https://phpackages.com/badges/avolle-cakephp-title/health.svg)](https://phpackages.com/packages/avolle-cakephp-title)
```

###  Alternatives

[friendsofcake/cakepdf

CakePHP plugin for creating and/or rendering Pdfs, several Pdf engines supported.

3752.1M3](/packages/friendsofcake-cakepdf)[cakephp/bake

Bake plugin for CakePHP

11211.2M158](/packages/cakephp-bake)[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

308850.3k14](/packages/dereuromark-cakephp-queue)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1862.1M27](/packages/dereuromark-cakephp-ide-helper)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

129228.6k10](/packages/dereuromark-cakephp-tinyauth)

PHPackages © 2026

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