Skip to content

Commit 55e5d00

Browse files
committed
[DOCS] Add example usage for Record Types
1 parent 321f098 commit 55e5d00

File tree

11 files changed

+146
-5
lines changed

11 files changed

+146
-5
lines changed

Build/config.example/sites/main/config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,15 @@ languages:
1111
flag: us
1212
rootPageId: 1
1313
routes: { }
14+
routeEnhancers:
15+
Example:
16+
type: Plugin
17+
namespace: 'tx_example_plugin'
18+
routePath: '/{record}'
19+
requirements:
20+
record: '^[a-zA-Z0-9].*$'
21+
aspects:
22+
record:
23+
type: PersistedAliasMapper
24+
tableName: 'tx_hov_domain_model_notype'
25+
routeFieldName: 'slug'

Build/content_blocks_examples/Configuration/Sets/Example/setup.typoscript

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,35 @@ page.10 {
77
20 = content-blocks
88
}
99
}
10+
11+
tt_content {
12+
example_plugin_list {
13+
dataProcessing {
14+
100 = database-query
15+
100 {
16+
table = tx_hov_domain_model_notype
17+
orderBy = title ASC
18+
pidInList.field = example_page_select
19+
as = listView
20+
dataProcessing {
21+
10 = content-blocks
22+
}
23+
}
24+
}
25+
}
26+
example_plugin_detail {
27+
dataProcessing {
28+
100 = database-query
29+
100 {
30+
if.isTrue.data = GP:tx_example_plugin|record
31+
table = tx_hov_domain_model_notype
32+
pidInList.field = example_page_select
33+
uidInList.data = GP:tx_example_plugin|record
34+
as = detailView
35+
dataProcessing {
36+
10 = content-blocks
37+
}
38+
}
39+
}
40+
}
41+
}
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: example/plugin-detail
2+
typeName: example_plugin_detail
3+
prefixFields: true
4+
prefixType: vendor
5+
vendorPrefix: example
6+
group: plugins
7+
basics:
8+
- TYPO3/Appearance
9+
- TYPO3/Links
10+
fields:
11+
-
12+
identifier: TYPO3/Header
13+
type: Basic
14+
-
15+
identifier: page_select
16+
type: Relation
17+
allowed: 'pages'
18+
relationship: manyToOne
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file datatype="plaintext" original="labels.xlf" source-language="en" date="2025-10-17T23:26:20+00:00" product-name="example/plugin-detail">
4+
<header/>
5+
<body>
6+
<trans-unit id="title">
7+
<source>Example Plugin Detail</source>
8+
</trans-unit>
9+
<trans-unit id="page_select.label">
10+
<source>Folder / Page with Record Types</source>
11+
</trans-unit>
12+
</body>
13+
</file>
14+
</xliff>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>{detailView.0.data.title}</h1>
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: example/plugin-list
2+
typeName: example_plugin_list
3+
prefixFields: true
4+
prefixType: vendor
5+
vendorPrefix: example
6+
group: plugins
7+
basics:
8+
- TYPO3/Appearance
9+
- TYPO3/Links
10+
fields:
11+
-
12+
identifier: TYPO3/Header
13+
type: Basic
14+
-
15+
identifier: page_select
16+
type: Relation
17+
allowed: 'pages'
18+
relationship: manyToOne
19+
-
20+
identifier: detail_page_select
21+
type: Relation
22+
allowed: 'pages'
23+
relationship: manyToOne
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0"?>
2+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
3+
<file datatype="plaintext" original="labels.xlf" source-language="en" date="2025-10-17T23:26:24+00:00" product-name="example/plugin-list">
4+
<header/>
5+
<body>
6+
<trans-unit id="title">
7+
<source>Example Plugin List</source>
8+
</trans-unit>
9+
<trans-unit id="page_select.label">
10+
<source>Folder / Page with Record Types</source>
11+
</trans-unit>
12+
<trans-unit id="detail_page_select.label">
13+
<source>Detail Page</source>
14+
</trans-unit>
15+
</body>
16+
</file>
17+
</xliff>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<h1>{data.header}</h1>
2+
3+
<f:for each="{listView}" as="item">
4+
<f:link.page pageUid="{data.detail_page_select.uid}" additionalParams="{tx_example_plugin: {record: item.data.uid}}">
5+
<h2>{item.data.title}</h2>
6+
</f:link.page>
7+
</f:for>

0 commit comments

Comments
 (0)