Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Improve content blocks #482

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

ExtensionManagementUtility::addTcaSelectItemGroup(
'tt_content',
'CType',
'{{ package.extensionKey }}',
'LLL:EXT:{{ package.extensionKey }}/Resources/Private/Language/locallang_be.xlf:content_element.group.{{ package.extensionKey }}',
'after:default',
);
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
name: {{ package.packageNameAlternative }}/carousel
typeName: {{ package.extensionKey }}_carousel
group: default
group: {{ package.extensionKey }}
prefixFields: true
prefixType: full
fields:
- identifier: carousel_items
type: Collection
foreign_field: parentid
minitems: 1
appearance:
collapseAll: true
levelLinksPosition: both
fields:
- identifier: image
type: File
allowed: common-image-types
minitems: 1
maxitems: 1
linawolf marked this conversation as resolved.
Show resolved Hide resolved
- identifier: header
type: Text
- identifier: description
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
<?xml version="1.0"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file datatype="plaintext" original="labels.xlf" source-language="en" date="2024-11-24T18:55:27+00:00" product-name="t3docs/carousel">
<header/>
<body>
<trans-unit id="title" resname="title">
<source>Carousel</source>
</trans-unit>
<trans-unit id="description" resname="description">
<source>See also https://getbootstrap.com/docs/5.0/components/carousel/</source>
</trans-unit>
<trans-unit id="carousel_items.label" resname="carousel_items.label">
<source>Carousel Items</source>
</trans-unit>
<trans-unit id="carousel_items.image.label" resname="carousel_items.image.label">
<source>Image</source>
</trans-unit>
<trans-unit id="carousel_items.header.label" resname="carousel_items.header.label">
<source>Header</source>
</trans-unit>
<trans-unit id="carousel_items.description.label" resname="carousel_items.description.label">
<source>Description</source>
</trans-unit>
<trans-unit id="previous.label" resname="previous.label">
<source>Previous</source>
</trans-unit>
<trans-unit id="next.label" resname="next.label">
<source>Next</source>
</trans-unit>
</body>
</file>
<file datatype="plaintext" original="labels.xlf" source-language="en" date="2024-11-24T18:55:27+00:00" product-name="t3docs/carousel">
<header/>
<body>
<trans-unit id="title" resname="title">
<source>Carousel</source>
</trans-unit>
<trans-unit id="description" resname="description">
<source>See also https://getbootstrap.com/docs/5.0/components/carousel/</source>
</trans-unit>
<trans-unit id="carousel_items.label" resname="carousel_items.label">
<source>Carousel Items</source>
</trans-unit>
<trans-unit id="carousel_items.image.label" resname="carousel_items.image.label">
<source>Image</source>
</trans-unit>
<trans-unit id="carousel_items.header.label" resname="carousel_items.header.label">
<source>Header</source>
</trans-unit>
<trans-unit id="carousel_items.description.label" resname="carousel_items.description.label">
<source>Description</source>
</trans-unit>
<trans-unit id="previous.label" resname="previous.label">
<source>Previous</source>
</trans-unit>
<trans-unit id="next.label" resname="next.label">
<source>Next</source>
</trans-unit>
<trans-unit id="backend.itemCount" resname="backend.itemCount">
<source>Carousel with %s items</source>
</trans-unit>
<trans-unit id="backend.lastUpdated" resname="backend.lastUpdated">
<source>Last updated %s</source>
</trans-unit>
</body>
</file>
</xliff>
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
<f:asset.css identifier="content-block-t3docs-t3docs/carousel-be" href="{cb:assetPath()}/preview.css"/>
<f:layout name="Preview"/>

<div class="row">
<f:for each="{data.carousel_items}" as="item" iteration="iteration">
<div class="col">
<f:for each="{item.image}" as="image" iteration="iteration">
<f:image image="{image}" width="100"/><br/>
</f:for>
{item.header}
</div>
</f:for>
</div>
<f:section name="Header">
<f:variable name="itemCount"><f:count subject="{data.carousel_items}" /></f:variable>
<div>{f:translate(key: '{cb:languagePath()}:backend.itemCount', arguments: {0: '{itemCount}'})}</div>
</f:section>

<f:section name="Content">
<div class="row">
<f:for each="{data.carousel_items}" as="item" iteration="iteration">
<div class="col">
<f:for each="{item.image}" as="image" iteration="iteration">
<f:image image="{image}" width="100"/><br/>
</f:for>
{item.header}
</div>
</f:for>
</div>
</f:section>

<f:section name="Footer">
<f:variable name="lastUpdated"><f:format.date>{data.rawRecord.crdate}</f:format.date></f:variable>
<div>{f:translate(key: '{cb:languagePath()}:backend.lastUpdated', arguments: {0: '{lastUpdated}'})}</div>
</f:section>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: {{ package.packageNameAlternative }}/jumbotron
typeName: {{ package.extensionKey }}_jumbotron
group: default
group: {{ package.extensionKey }}
prefixFields: true
prefixType: full
fields:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<trans-unit id="backend_layout.column.right">
<source>Right</source>
</trans-unit>
<trans-unit id="content_element.group.{{ package.extensionKey }}">
<source>{{ package.title }} elements</source>
</trans-unit>
</body>
</file>
</xliff>
Loading