---
title: "Routing example"
manual: "TYPO3 EXT:thuecat"
version: "main"
permalink: "https://docs.typo3.org/permalink/werkraummedia/thuecat:routing-example@main"
source: "Integration/FrontendOutput/RoutingExample.rst"
rendered: "2026-10-15T09:07:32+00:00"
---

# Routing example {#routing-example}

A routed attraction detail page, from the content element to the URL. Replace `myvendor` with
your own vendor name.

## The content element {#routing-example-the-content-element}

The attraction detail content element wires its `CType` to the `TouristAttractionShow` plugin,
as all content elements do, see [Content element example](https://docs.typo3.org/permalink/werkraummedia/thuecat:content-element-example@main):

**EXT:myextension/ContentBlocks/ContentElements/attraction-show/setup.typoscript**

```typoscript
tt_content.myvendor_attractionshow =< lib.contentBlock
tt_content.myvendor_attractionshow {
    20 =< lib.myvendorThuecatPlugin
    20 {
        pluginName = TouristAttractionShow
    }
}
```

## The route {#routing-example-the-route}

The site configuration imports the route of the detail plugin:

**config/sites/\<your-site>/config.yaml**

```yaml
imports:
  - { resource: 'EXT:thuecat/Configuration/Routes/TouristAttractionShow.yaml' }
```

## The page role {#routing-example-the-page-role}

The page carrying the content element gets **Tourist attraction detail** as its
**ThüCAT page role**. Its uid is the site setting `thuecat.pois.pid_show`, so list links
and the sitemap point there.

## The mapping {#routing-example-the-mapping}

The site set's page TSconfig maps the content element type to the role, so the page module tells
editors when the role is missing:

**EXT:myextension/Configuration/Sets/MySet/page.tsconfig**

```typoscript
tx_thuecat.pageRoles.myvendor_attractionshow = thuecat_touristattractionshow
```

## The result {#routing-example-the-result}

A list linking to the attraction "Stadtmuseum Erfurt" on the detail page `/ausflugsziel`
produces `/ausflugsziel/stadtmuseum-erfurt`, and that URL renders the attraction.
