feat: add content elements, change backend preview

This commit is contained in:
2024-12-15 19:08:26 +01:00
parent 1076fe6447
commit 696881e4f8
15 changed files with 137 additions and 26 deletions

View File

@@ -0,0 +1 @@
/* CSS for header content element */

View File

@@ -0,0 +1,10 @@
name: cloonar/header
typeName: cloonar_header
group: default
prefixFields: true
prefixType: full
label: LLL:EXT:base/ContentBlocks/ContentElements/header/language/labels.xlf:header.title
description: LLL:EXT:base/ContentBlocks/ContentElements/header/language/labels.xlf:header.description
fields:
- identifier: header
useExistingField: true

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<xliff version="1.0">
<file source-language="en" datatype="plaintext" original="messages">
<body>
<trans-unit id="title">
<source>Header</source>
</trans-unit>
<trans-unit id="description">
<source>A simple content element that displays a header as an H1.</source>
</trans-unit>
</body>
</file>
</xliff>

View File

@@ -0,0 +1,15 @@
<html
xmlns:be="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
data-namespace-typo3-fluid="true"
>
<f:layout name="Preview"/>
<f:section name="Header">
<be:link.editRecord uid="{data.uid}" table="{data.mainType}">
<f:if condition="{data.header}">
<f:then><strong>{data.header}</strong></f:then>
</f:if>
</be:link.editRecord>
</f:section>
<f:section name="Content">
</f:section>
</html>

View File

@@ -0,0 +1,4 @@
<f:layout name="Default" />
<f:section name="Main">
<h1>{data.header}</h1>
</f:section>