<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>{data.header}</f:then>
          <f:else>Text/Image Element</f:else>
        </f:if>
    </be:link.editRecord>
</f:section>

<f:section name="Content">
  <f:if condition="{data.bodytext}">
    <f:then>
      <p>Preview: <f:format.crop maxCharacters="50">{data.bodytext}</f:format.crop></p>
    </f:then>
    <f:else>
      <p>No text available</p>
    </f:else>
  </f:if>
</f:section>
</html>
