---
title: "Routing"
manual: "TYPO3 Explained"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3coreapi:typo3-request-attribute-routing@13.4"
source: "ApiOverview/RequestLifeCycle/RequestAttributes/Routing.rst"
rendered: "2026-09-17T15:24:38+00:00"
---

# Routing {#routing}

-   [Frontend](https://docs.typo3.org/permalink/t3coreapi:frontend@13.4)
-   [Backend](https://docs.typo3.org/permalink/t3coreapi:backend@13.4)

## Frontend {#frontend}

The `routing` frontend request attribute provides routing information in
the object `\TYPO3\CMS\Core\Routing\PageArguments`. If you want to know the
current page ID or retrieve the query parameters this attribute is your friend.

Example:

```php
/** @var \Psr\Http\Message\ServerRequestInterface $request */
$pageArguments = $request->getAttribute('routing');
$pageId = $pageArguments->getPageId();
```

### API {#api}

-   **class PageArguments**

    -   *Fully qualified name:* `\TYPO3\CMS\Core\Routing\PageArguments`

    Contains all resolved parameters when a page is resolved from a page path segment plus all fragments.

    -   **areDirty()**

        *Returns:* `bool`

    -   **getRouteArguments()**

        *Returns:* `array<string,string|array>`

    -   **getPageId()**

        *Returns:* `int`

    -   **getPageType()**

        *Returns:* `string`

    -   **get(string $name)**

        -   *param $name:* the name

        *Returns:* `string|array<string,string|array>|null`

    -   **getArguments()**

        *Returns:* `array<string,string|array>`

    -   **getStaticArguments()**

        *Returns:* `array<string,string|array>`

    -   **getDynamicArguments()**

        *Returns:* `array<string,string|array>`

    -   **getQueryArguments()**

        *Returns:* `array<string,string|array>`

    -   **offsetExists(?mixed $offset)**

        -   *param $offset:* the offset

        *Returns:* `bool`

    -   **offsetGet(?mixed $offset)**

        -   *param $offset:* the offset

        *Returns:* `string|array<string,string|array>|null`

    -   **offsetSet(?mixed $offset, ?mixed $value)**

        -   *param $offset:* the offset
        -   *param $value:* the value

    -   **offsetUnset(?mixed $offset)**

        -   *param $offset:* the offset

## Backend {#backend}

<!-- TODO: no Markdown rendering for "versionadded" -->

The `routing` backend request attribute provides routing information in
the object `\TYPO3\CMS\Backend\Routing\RouteResult`.

Example:

```php
/** @var \Psr\Http\Message\ServerRequestInterface $request */
$routing = $request->getAttribute('routing');
$arguments = $routing->getArguments()
```

> [!NOTE]
> **See also**
>
> [Dynamic URL parts in backend URLs](https://docs.typo3.org/permalink/t3coreapi:backend-routing-dynamic-parts@13.4)

### API {#api-1}

-   **class RouteResult**

    -   *Fully qualified name:* `\TYPO3\CMS\Backend\Routing\RouteResult`

    A route result for the TYPO3 Backend Routing,
    containing the matched Route and the related arguments found in the URL

    -   **getRoute()**

        *Returns:* `TYPO3CMSBackendRoutingRoute`

    -   **getRouteName()**

        *Returns:* `string`

    -   **getArguments()**

        *Returns:* `array`

    -   **offsetExists(?mixed $offset)**

        -   *param $offset:* the offset

        *Returns:* `bool`

    -   **offsetGet(?mixed $offset)**

        -   *param $offset:* the offset

        *Returns:* `?mixed`

    -   **offsetSet(?mixed $offset = '', ?mixed $value = '')**

        -   *param $offset:* the offset, default: ''
        -   *param $value:* the value, default: ''

    -   **offsetUnset(?mixed $offset)**

        -   *param $offset:* the offset
