Integrate Backend View

The extension provides the possibility to generate page type-based information in the header of the web module.

For each page type, a partial can be added, which can be provided with the necessary information according to your own wishes and ideas.

The following steps are necessary to create a page type-based information block:

Create an override TypoScript

EXT:example/ext_typoscript_setup.typoscript
module.tx_backend {
  view {
    partialRootPaths {
      example = EXT:example/Resources/Private/Backend/Partials/
    }
  }
}

Create your partial

EXT:example/Resources/Private/Backend/Partials/PageLayout/Doktype<YOUR-DOKTYPE>.html
<f:if condition="{context.pageRecord.doktype} == <YOUR-DOKTYPE>">
    <div class="callout callout-notice">
        <!-- your code goes here -->
    </div>
</f:if>

ViewHelpers

In case you need image preview, this extension ships a ViewHelper for getting the image for you in backend context. This ViewHelper only works in Backend-Context, as you normally don't need it in frontend.

EXT:example/Resources/Private/Backend/Partials/PageLayout/Doktype<YOUR-DOKTYPE>.html
 1<html
 2    data-namespace-typo3-fluid="true"
 3    lang="en"
 4    xmlns:f="https://typo3.org/ns/TYPO3Fluid/Fluid/ViewHelpers"
 5    xmlns:pbl="http://typo3.org/ns/FGTCLB/PageBackendLayout/ViewHelpers"
 6>
 7<f:if condition="{context.pageRecord.doktype} == <YOUR-DOKTYPE>">
 8    <div class="callout callout-notice">
 9        <f:if condition="{context.pageRecord.media}">
10            <f:then>
11                <pbl:be.imageId as="thumb" field="media" returnFirst="true" table="pages" uid="{context.pageRecord.uid}">
12                    <f:if condition="{thumb}">
13                        <f:image image="{thumb.originalFile}" width="200"/>
14                    </f:if>
15                </pbl:be.imageId>
16            </f:then>
17            <f:else><span>No image</span></f:else>
18        </f:if>
19        <!-- your code goes here -->
20    </div>
21</f:if>