3.5.1 The Preview Section

FluidTYPO3 File contexts, Templates

Flux includes support for a special Preview section in your templates. How this section is used (or if it is used at all) depends on the feature that renders the template. In the Fluid Powered TYPO3 world, Preview sections are possible in Content, CoreContent and custom plugin templates but not in Page templates or backend-related templates currently.

Important! The Preview section gets rendered in a backend context which means you must be careful not to use frontend-only ViewHelpers here. Some examples of frontend-only ViewHelpers are v:content.render (but not v:content.get!), f:form and other similar types dealing exclusively with frontend output. You can still use ViewHelpers like f:image but you may need to create your src attribute values using relative paths.

An example Preview section looks like this:

<f:section name="Preview">
    You entered "{settings.myValue}" in the "myValue" field.
</f:section>

As long as you observe the rule of not using frontend-only ViewHelpers you can use special constructs like conditions, loops, render other sections and partials, use translation labels and more. Should you use a frontend-only ViewHelper by mistake it is possible that your backend fails with an error - if this happens, the error message will have been recorded in your error logs and you can recover by simply undoing the template change that caused the error, unloading the TypoScript that added it, etc.

The following chapter explains how to use the Grid Widget to support editing of child content through the page module.

Jump to...