PHPackages                             rrd108/cakephp-menulink - 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. rrd108/cakephp-menulink

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

rrd108/cakephp-menulink
=======================

MenuLink plugin for CakePHP

1.2.0(6y ago)0344[4 issues](https://github.com/rrd108/cakephp-menulink/issues)MITPHPCI failing

Since Jul 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/rrd108/cakephp-menulink)[ Packagist](https://packagist.org/packages/rrd108/cakephp-menulink)[ RSS](/packages/rrd108-cakephp-menulink/feed)WikiDiscussions master Synced 6d ago

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

MenuLink plugin for CakePHP 3
=============================

[](#menulink-plugin-for-cakephp-3)

This is a handy and really simple plugin for displaying the active menu item based on the url. If you have a link pointing to the current url, it will get an "active" css class. You should add your own css definitin for `a.active` to your css file.

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require rrd108/cakephp-menulink

```

Usage
-----

[](#usage)

### Load the plugin

[](#load-the-plugin)

Load the plugin in your `/config/bootstrap.php` file

```
Plugin::load('MenuLink');
```

### Load and use the helper

[](#load-and-use-the-helper)

You can load the helper in two different ways, the reccomended way or the override way.

#### Recommended way

[](#recommended-way)

In your `/src/View/AppView.php` file at your `initialize()` method load the helper like this.

```
$this->loadHelper('MenuLink.MenuLink');
```

In this case in your view files you should use the helper like this.

```
$this->MenuLink->menuLink(
    'Link text',
    [
        'controller' => 'posts',
        'action' => 'index'
    ],
    [$options]
);
```

The menuLink call handles the same paramaeters as the core Html helper's [link method](https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-links)

#### Override the Html helper

[](#override-the-html-helper)

This is a little bit more comfortable way to do the same above. As this way overrides the core Html helper it can conflict with other helpers trying to override the same thing.

In your `/src/View/AppView.php` file at your `initialize()` method load the helper like this.

```
$this->loadHelper('Html', ['className' => 'MenuLink.MenuLink']);
```

In this case in your view files you should use the helper like this.

```
$this->Html->menuLink(
    'Link text',
    [
        'controller' => 'posts',
        'action' => 'index'
    ],
    [$options]
);
```

The menuLink call handles the same paramaeters as the core Html helper's [link method](https://book.cakephp.org/3.0/en/views/helpers/html.html#creating-links)

In both ways your active link will look like this, but others will do not have this css class definition.

```
Link text
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity66

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 ~267 days

Total

4

Last Release

2512d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f115ed63db719bb70b5f9f74a077e5dba1e3962d394f63bde914de8f64171d8?d=identicon)[rrd](/maintainers/rrd)

---

Top Contributors

[![rrd108](https://avatars.githubusercontent.com/u/3147489?v=4)](https://github.com/rrd108 "rrd108 (14 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rrd108-cakephp-menulink/health.svg)

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

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

3321.0M51](/packages/dereuromark-cakephp-tools)[cakephp/bake

Bake plugin for CakePHP

11212.2M222](/packages/cakephp-bake)[dereuromark/cakephp-ide-helper

CakePHP IdeHelper Plugin to improve auto-completion

1892.4M48](/packages/dereuromark-cakephp-ide-helper)[dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

308995.7k27](/packages/dereuromark-cakephp-queue)[dereuromark/cakephp-tinyauth

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

131242.7k13](/packages/dereuromark-cakephp-tinyauth)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

30101.5k6](/packages/dereuromark-cakephp-dto)

PHPackages © 2026

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