PHPackages                             wemakecustom/template-in-route-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. [Templating &amp; Views](/categories/templating)
4. /
5. wemakecustom/template-in-route-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

wemakecustom/template-in-route-bundle
=====================================

Allow the Template to be configured directly in the Route

v1.0(11y ago)0151MITPHP

Since Apr 8Pushed 10y ago5 watchersCompare

[ Source](https://github.com/wemakecustom/TemplateInRouteBundle)[ Packagist](https://packagist.org/packages/wemakecustom/template-in-route-bundle)[ RSS](/packages/wemakecustom-template-in-route-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

WMCRouteInTemplateBundle
========================

[](#wmcrouteintemplatebundle)

This bundle extends [SensioFrameworkExtraBundle](https://github.com/sensiolabs/SensioFrameworkExtraBundle)and is a port of the PR [SensioFrameworkExtraBundle#266](https://github.com/sensiolabs/SensioFrameworkExtraBundle/pull/266).

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

[](#installation)

The bundle can be installed via composer:

```
 php composer.phar require wemakecustom/template-in-route-bundle

```

You then simply need to enable it in your AppKernel:

```
 new WMC\TemplateInRouteBundle\WMCTemplateInRouteBundle

```

Usage
-----

[](#usage)

This bundle allow the template to be specified directly in the Route via a `_template` attribute, just like if the `@Template` annotation was used.

```
 my_route:
    path: /{product}-awesome
    defaults: { _controller: Bundle:Product:show, _template: Bundle:Product:show-awesome.html.twig}

```

If the template is named after the controller and action names, you can even skip the value for the `_template` parameter:

```
 my_route:
    path: /{product}-awesome
    defaults: { _controller: Bundle:Product:showAwesome, _template: true }

```

This will use the template guesser, same as specifying `@Template` without a template name.

When specified through the route, the `_template` parameter will be removed from `_route_params`.

This is especially useful if Routes are generated programatically or if the same controller renders several routes requiring different templates.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

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

Unknown

Total

1

Last Release

4058d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/234992?v=4)[Mathieu Lemoine](/maintainers/lemoinem)[@lemoinem](https://github.com/lemoinem)

![](https://avatars.githubusercontent.com/u/4030561?v=4)[Virgile](/maintainers/ksom)[@ksom](https://github.com/ksom)

---

Top Contributors

[![lemoinem](https://avatars.githubusercontent.com/u/234992?v=4)](https://github.com/lemoinem "lemoinem (3 commits)")

---

Tags

templateroute

### Embed Badge

![Health badge](/badges/wemakecustom-template-in-route-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/wemakecustom-template-in-route-bundle/health.svg)](https://phpackages.com/packages/wemakecustom-template-in-route-bundle)
```

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.6k34.7M186](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

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