Skip to content

Commit 7334554

Browse files
[TASK] Document carousel Content Block (#340) (#346)
* [TASK] Document carousel Releases: main, 13.4 * [TASK] Document carousel Releases: main, 13.4 * [TASK] Document carousel Releases: main, 13.4 * Update Carousel.rst * Update Documentation/ContentBlocks/Carousel.rst * Update Index.rst Co-authored-by: Lina Wolf <[email protected]>
1 parent cbf15af commit 7334554

File tree

13 files changed

+243
-33
lines changed

13 files changed

+243
-33
lines changed
Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
1-
<f:asset.css identifier="content-block-t3docs-t3docs/carousel-be" href="{cb:assetPath()}/preview.css"/>
1+
<f:layout name="Preview"/>
22

3-
<div class="row">
4-
<f:for each="{data.carousel_items}" as="item" iteration="iteration">
5-
<div class="col">
6-
<f:for each="{item.image}" as="image" iteration="iteration">
7-
<f:image image="{image}" width="100"/><br/>
8-
</f:for>
9-
{item.header}
10-
</div>
11-
</f:for>
12-
</div>
3+
<f:section name="Header">
4+
<f:variable name="itemCount"><f:count subject="{data.carousel_items}" /></f:variable>
5+
<div>{f:translate(key: '{cb:languagePath()}:backend.itemCount', arguments: {0: '{itemCount}'})}</div>
6+
</f:section>
7+
8+
<f:section name="Content">
9+
<div class="row">
10+
<f:for each="{data.carousel_items}" as="item" iteration="iteration">
11+
<div class="col">
12+
<f:image image="{item.image}" width="100"/><br/>
13+
{item.header}
14+
</div>
15+
</f:for>
16+
</div>
17+
</f:section>
18+
19+
<f:section name="Footer">
20+
<f:variable name="lastUpdated"><f:format.date>{data.rawRecord.crdate}</f:format.date></f:variable>
21+
<div>{f:translate(key: '{cb:languagePath()}:backend.lastUpdated', arguments: {0: '{lastUpdated}'})}</div>
22+
</f:section>

Documentation/CodeSnippets/my_site_package/ContentBlocks/ContentElements/carousel/templates/frontend.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
<div class="carousel-inner">
1111
<f:for each="{data.carousel_items}" as="item" iteration="iteration">
1212
<div class="carousel-item{f:if(condition: '{iteration.isFirst}', then:' active')}">
13-
<f:for each="{item.image}" as="image" iteration="iteration">
14-
<f:image image="{image}" class="d-block w-100"/>
15-
</f:for>
13+
<f:image image="{item.image}" class="d-block w-100"/>
1614
<div class="carousel-caption d-none d-md-block">
1715
<h5>{item.header}</h5>
1816
<f:format.html>{item.description}</f:format.html>
Lines changed: 1 addition & 1 deletion
Loading

Documentation/CodeSnippets/my_site_package/Resources/Private/Language/locallang.xlf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
22
<xliff version="1.0">
3-
<file source-language="en" datatype="plaintext" original="messages" date="2024-12-11UTC10:20:370">
3+
<file source-language="en" datatype="plaintext" original="messages" date="2025-01-26UTC08:22:400">
44
<header>
5-
<authorName>J. Doe</authorName>
6-
<authorEmail>j.doe@example.org</authorEmail>
5+
<authorName>John Doe</authorName>
6+
<authorEmail>j.doe@example.com</authorEmail>
77
</header>
88
<body>
99
</body>

Documentation/CodeSnippets/my_site_package/Resources/Private/Language/locallang_be.xlf

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
22
<xliff version="1.0">
3-
<file source-language="en" datatype="plaintext" original="messages" date="2024-12-11UTC10:20:370">
3+
<file source-language="en" datatype="plaintext" original="messages" date="2025-01-26UTC08:22:400">
44
<header>
5-
<authorName>J. Doe</authorName>
6-
<authorEmail>j.doe@example.org</authorEmail>
5+
<authorName>John Doe</authorName>
6+
<authorEmail>j.doe@example.com</authorEmail>
77
</header>
88
<body>
99
<trans-unit id="backend_layout.default">
@@ -21,6 +21,9 @@
2121
<trans-unit id="backend_layout.column.right">
2222
<source>Right</source>
2323
</trans-unit>
24+
<trans-unit id="content_element.group.my_site_package">
25+
<source>My Site Package elements</source>
26+
</trans-unit>
2427
</body>
2528
</file>
2629
</xliff>

Documentation/CodeSnippets/my_site_package/Resources/Private/Language/locallang_db.xlf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
22
<xliff version="1.0">
3-
<file source-language="en" datatype="plaintext" original="messages" date="2024-12-11UTC10:20:370">
3+
<file source-language="en" datatype="plaintext" original="messages" date="2025-01-26UTC08:22:400">
44
<header>
5-
<authorName>J. Doe</authorName>
6-
<authorEmail>j.doe@example.org</authorEmail>
5+
<authorName>John Doe</authorName>
6+
<authorEmail>j.doe@example.com</authorEmail>
77
</header>
88
<body>
99
</body>
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

Documentation/CodeSnippets/my_site_package/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "my-vendor/my-site-package",
33
"type": "typo3-cms-extension",
4-
"description": "Site package to follow the tutorial.",
5-
"homepage": "https://docs.typo3.org/permalink/t3sitepackage:start",
4+
"description": "",
5+
"homepage": "https://example.com",
66
"license": ["GPL-2.0-or-later"],
77
"keywords": ["TYPO3 CMS"],
88
"require": {

Documentation/CodeSnippets/my_site_package/ext_emconf.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
$EM_CONF[$_EXTKEY] = [
44
'title' => 'My Site Package',
5-
'description' => 'Site package to follow the tutorial.',
5+
'description' => '',
66
'category' => 'templates',
77
'constraints' => [
88
'depends' => [
@@ -22,8 +22,8 @@
2222
'uploadfolder' => 0,
2323
'createDirs' => '',
2424
'clearCacheOnLoad' => 1,
25-
'author' => 'J. Doe',
26-
'author_email' => 'j.doe@example.org',
25+
'author' => 'John Doe',
26+
'author_email' => 'j.doe@example.com',
2727
'author_company' => 'My Vendor',
2828
'version' => '1.0.0',
2929
];

0 commit comments

Comments
 (0)