Routing example
A routed attraction detail page, from the content element to the URL. Replace myvendor with
your own vendor name.
The content element
The attraction detail content element wires its CType to the Tourist plugin,
as all content elements do, see Content element example:
tt_content.myvendor_attractionshow =< lib.contentBlock
tt_content.myvendor_attractionshow {
20 =< lib.myvendorThuecatPlugin
20 {
pluginName = TouristAttractionShow
}
}
The route
The site configuration imports the route of the detail plugin:
imports:
- { resource: 'EXT:thuecat/Configuration/Routes/TouristAttractionShow.yaml' }
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., so list links
and the sitemap point there.
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:
tx_thuecat.pageRoles.myvendor_attractionshow = thuecat_touristattractionshow
The result
A list linking to the attraction "Stadtmuseum Erfurt" on the detail page /ausflugsziel
produces /ausflugsziel/, and that URL renders the attraction.