PHPackages                             renttek/magento2-virtual-controllers - 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. renttek/magento2-virtual-controllers

ActiveMagento2-module

renttek/magento2-virtual-controllers
====================================

A module which enables developers to create virtual controllers in Magento 2

2.1.2(5y ago)303.1k1MITPHPPHP ~7.1CI failing

Since May 13Pushed 5y ago2 watchersCompare

[ Source](https://github.com/renttek/magento2-virtual-controllers)[ Packagist](https://packagist.org/packages/renttek/magento2-virtual-controllers)[ RSS](/packages/renttek-magento2-virtual-controllers/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (6)Versions (9)Used By (0)

Renttek\_VirtualControllers
===========================

[](#renttek_virtualcontrollers)

Enables creating of routes with "virtual controllers"

[![Build Status](https://camo.githubusercontent.com/854114c372e137749429a5f121e3e6afe9683e82211a13a8720d4a82feec70df/68747470733a2f2f7472617669732d63692e6f72672f72656e7474656b2f6d6167656e746f322d7669727475616c2d636f6e74726f6c6c6572732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/renttek/magento2-virtual-controllers)[![Latest Stable Version](https://camo.githubusercontent.com/a64cebcc1fea15e9a222a64295f17758655132cc71e88e95a509817845ebbdd7/68747470733a2f2f706f7365722e707567782e6f72672f72656e7474656b2f6d6167656e746f322d7669727475616c2d636f6e74726f6c6c6572732f76657273696f6e)](https://packagist.org/packages/renttek/magento2-virtual-controllers)[![License](https://camo.githubusercontent.com/9c363fcc4e7e5f721ebbf93b2db990745e265918cfdc2cada96a39843983fc4e/68747470733a2f2f706f7365722e707567782e6f72672f72656e7474656b2f6d6167656e746f322d7669727475616c2d636f6e74726f6c6c6572732f6c6963656e7365)](https://packagist.org/packages/renttek/magento2-virtual-controllers)

What is a virtual controllers? A virtual controller is a path + an optional layout handle which will be set. With that it is possible to create custom routes where you can place custom blocks to your wishes. (In Magento 2 this is currently only possible by creating a route.xml &amp; a dummy controller action, which returns a `\Magento\Framework\View\Result\Page`)

Comparison
----------

[](#comparison)

Here is a short comparison of the minimal required code to create a custom route (example/page/view) in Magento 2 (given there is already a module My\_Module)

### Vanilla Magento 2

[](#vanilla-magento-2)

&lt;module\_dir&gt;/etc/frontend/routes.xml

```

```

&lt;module\_dir&gt;/Controllers/Page/View.php

```

```

Features
--------

[](#features)

### Handles

[](#handles)

Besides the much simpler creation of custom routes, every route will get a few layout handles set:

- "default"
- "virtual\_controller"
- The given path, but all characters except `[a-z_]` are replaced by underscores. (`example/page/view` =&gt; `example_page_view`)

The generated handle can also be set manually in the xml configuration like this:

&lt;module\_dir&gt;/etc/virtual\_controllers.xml

```

```

Routes can also be disabled by setting `disabled=true` in the configuration:

```

```

### Forwards

[](#forwards)

Another feature is the possibility of creating forwards without creating a controller. Forwards are needed if you want to display another URL for a page. (e.g. 'my/shoppingcart' =&gt; 'checkout/cart')

```

```

In V1 the attributes `controller` and `action` defaulted to 'index' if not specified. In V2 this is not the case!

Forwards are only URLs/path that **CAN** be called. It does not extend/manipulate url generation in any way.

---

All routes are merged by the path attribute, so it is possible to disable routes from other modules.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Recently: every ~191 days

Total

8

Last Release

2110d ago

Major Versions

1.1.1 → 2.0.02018-08-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/91426e74250adada5b0db6113d4c4c7b10cfcbffc6532c79092089051b399ffd?d=identicon)[renttek](/maintainers/renttek)

---

Tags

magento2

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/renttek-magento2-virtual-controllers/health.svg)

```
[![Health](https://phpackages.com/badges/renttek-magento2-virtual-controllers/health.svg)](https://phpackages.com/packages/renttek-magento2-virtual-controllers)
```

###  Alternatives

[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.2M1](/packages/fastly-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50374.2k18](/packages/dotdigital-dotdigital-magento2-extension)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[zepgram/module-rest

Technical module to industrialize API REST call with dependency injection pattern using Guzzle library

1326.2k](/packages/zepgram-module-rest)[graycore/magento2-graphql-introspection-cache

1015.2k](/packages/graycore-magento2-graphql-introspection-cache)[mage-os/mageos-common-async-events

Send REST requests to external endpoints asynchronously. This module implements the most common events like order creation and customer change.

147.7k2](/packages/mage-os-mageos-common-async-events)

PHPackages © 2026

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