Upgrade to version V3

Update Fluid Template

Description

Backend view are now created with moduleTemplateFactory() method instead of StandaloneView and use of JavaScript ES6 modules instead of AMD modules.

Impact

Template paths are no longer initialized from TypoScript but from Page TsConfig and Fluid Templates need some changes in content and path.

Migration

Create a file <your_extension_name>Configuration/page.tsconfig with this content :

templates.oktopuce/site-generator.templateRootPaths = oktopuce/site-generator:../<your_extension_name>/Resources/Private

replace <your_extension_name> with your own extension.

remove templateRootPath, partialRootPath and layoutRootPath path from: <your_extension_name>/ext_typoscript_constants.typoscript (they are no more needed).

and move your custom templates from <your_extension_name>/Resources/Private/Templates/SiteGenerator to <your_extension_name>/Resources/Private/Templates

In your customized Fluid Templates change:

<f:layout name="Default" />

...

<f:section name="content">
   ...
</f:section>

with:

<f:layout name="Module" />

<f:section name="Before">
    <f:be.pageRenderer includeJavaScriptModules="{
        0: '@typo3/backend/context-menu.js',
        1: '@oktopuce/site-generator/site-generator-form.js'
    }"/>
</f:section>

...

<f:section name="Content">
   ...
</f:section>

Caution

Take care of the uppercase at the beginning of "Content" in <f:section name="Content">

Hint

You can now also use a partial for content form data.