feat: add content elements, change backend preview
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/* CSS for text content element */
|
||||
14
packages/base/ContentBlocks/ContentElements/text/config.yaml
Normal file
14
packages/base/ContentBlocks/ContentElements/text/config.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
name: cloonar/text
|
||||
typeName: cloonar_text
|
||||
group: default
|
||||
prefixFields: true
|
||||
prefixType: full
|
||||
label: LLL:EXT:base/ContentBlocks/ContentElements/text/language/labels.xlf:text.title
|
||||
description: LLL:EXT:base/ContentBlocks/ContentElements/text/language/labels.xlf:text.description
|
||||
fields:
|
||||
- identifier: header
|
||||
useExistingField: true
|
||||
- identifier: bodytext
|
||||
type: Textarea
|
||||
enableRichtext: true
|
||||
useExistingField: true
|
||||
@@ -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>Text</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description">
|
||||
<source>A text element featuring a headline (H2) and a rich-text body field.</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,22 @@
|
||||
<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:if condition="{data.bodytext}">
|
||||
<p>
|
||||
<f:format.crop maxCharacters="80">
|
||||
<f:format.stripTags>{data.bodytext}</f:format.stripTags>
|
||||
</f:format.crop>
|
||||
</p>
|
||||
</f:if>
|
||||
</f:section>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<f:layout name="Default" />
|
||||
<f:section name="Main">
|
||||
<f:if condition="{data.header}">
|
||||
<f:then><h2>{data.header}</h2></f:then>
|
||||
</f:if>
|
||||
<f:if condition="{data.bodytext}">
|
||||
<f:then>
|
||||
<div class="text-bodytext"><f:format.html>{data.bodytext}</f:format.html></div>
|
||||
</f:then>
|
||||
</f:if>
|
||||
</f:section>
|
||||
Reference in New Issue
Block a user