Detail record kinds
A detail record kind is a table whose records have a detail page of their own: tourist attractions
and trails today. The kinds are listed in one registry,
\Werkraum. The slug upgrade wizard and
the XML sitemap ask it instead of naming a table, so a kind added by another package reaches them.
On this page
What a kind declares
A kind is a
\Werkraum:
| Property | Example | Purpose |
|---|---|---|
identifier | attraction | Stable key, used as config. of the sitemap. |
table | tx_ | The table holding the records. |
extension | Thue | Extbase extension name of the show plugin. |
plugin | Tourist | Extbase plugin rendering one record. |
argument | attraction | The show action's record argument. |
show | thuecat. | Site setting naming the canonical detail page; 0 or unset means none. |
Registering a kind
Implement
\Werkraum in an
autoconfigured service of your package. The interface carries the service tag, so nothing else is
registered:
namespace MyVendor\MyExtension\DetailRecordKind;
use WerkraumMedia\ThueCat\Domain\DetailRecordKind\DetailRecordKind;
use WerkraumMedia\ThueCat\Domain\DetailRecordKind\DetailRecordKindProvider;
final class MeetingPlaceKind implements DetailRecordKindProvider
{
public function getKind(): DetailRecordKind
{
return new DetailRecordKind(
'meetingplace',
'tx_myextension_meeting_place',
'MyExtension',
'MeetingPlaceShow',
'meetingPlace',
'myextension.meetingplaces.pid_show',
);
}
}
services:
_defaults:
autowire: true
autoconfigure: true
public: false
MyVendor\MyExtension\:
resource: '../Classes/*'
What a new kind ships alongside
The registry entry makes the kind known; each capability still needs its own file:
- Slug column
- A
slugcolumn of TCA typeslug, generated from the title,evalunique,In Site prependfalse. New records get their slug on insert; the upgrade wizard fills existing ones, see Slugs.Slash - Route file
- A route enhancer YAML for the show plugin, like
EXT:: anthuecat/ Configuration/ Routes/ Tourist Attraction Show. yaml Extbaseenhancer withroute, aPath: '/ {<argument>}' PersistedonAlias Mapper slug, andlimiton the page role. Sites import it, see Routing.To Pages - Page role item
- An item for
pages., added through a TCA override withtx_ thuecat_ page_ role Extension, whose value the route file'sManagement Utility:: add Tca Select Item () limitnames.To Pages - Page role mapping
- One
tx_line for the content element type rendering the show plugin, in the package that defines the content element.thuecat. page Roles - Sitemap block
- One block under
plugin.withtx_ seo. config. xml Sitemap. sitemaps config.set to the identifier, see XML sitemap.kind - Show template markup
- The structured data of the detail page, in the template of the package that renders it.