PHPackages                             mrmilu/alias\_subpaths - 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. mrmilu/alias\_subpaths

ActiveDrupal-mrmilu-module[Utility &amp; Helpers](/categories/utility)

mrmilu/alias\_subpaths
======================

Allows have aliases with subpaths.

v1.0.2(5mo ago)02[3 issues](https://github.com/mrmilu/drupal.alias_subpaths/issues)[1 PRs](https://github.com/mrmilu/drupal.alias_subpaths/pulls)PHP

Since Sep 15Pushed 2mo agoCompare

[ Source](https://github.com/mrmilu/drupal.alias_subpaths)[ Packagist](https://packagist.org/packages/mrmilu/alias_subpaths)[ RSS](/packages/mrmilu-alias-subpaths/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)DependenciesVersions (9)Used By (0)

Alias Subpaths
==============

[](#alias-subpaths)

Drupal module to allow route aliases to recieve additional URL arguments. This module defines a new Drupal plugin system to allow developers which routes can recieve arguments.

Arguments are stored into a Drupal service `alias_subpaths.context_manager`. This service has 2 arrays (called bags) that stores raw arguments and the processed arguments, and it is available to use it anywhere.

```
\Drupal::service('alias_subpaths.context_manager')->getContextBag();
\Drupal::service('alias_subpaths.context_manager')->getProcessedContextBag();
```

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

[](#installation)

To install this module as mrmilu module inside `modules/mrmilu` folder following composer commands should be executed:

- Install packages to avoid that the module will be installed in vendor folder.
```
composer require mnsami/composer-custom-directory-installer
composer require oomphinc/composer-installers-extender
```

- Before installer-paths section in composer.json file, add this section:
```
"installer-types": [
  "drupal-mrmilu-module"
],
```

- Tell composer.json project file where the module repository is located and this section will be added automatically to repositories section in composer file.
```
composer config repositories.alias_subpaths vcs git@github.com:mrmilu/drupal.alias_subpaths.git
```

- Install as other contrib modules
```
composer require mrmilu/alias_subpaths
```

Usage
-----

[](#usage)

There is an example into `alias_subpath_node` submodule that enable argument processor for node routes:

```
