dompil
dompil

Reputation: 11

TYPO3 7.6, content preview in backend

Is it possible to render frontend content view in the backend? I want to substitute typical backend previews of content elements with their frontend views. I know how to register a tt_content_drawItem Hook class in $GLOBALS. In my custom Hook I would like to render content elements, return rendered content in $itemContent variable.

It seems that to solve this problem I need to somehow set frontend controller ($GLOBALS['tsfe']?). I've tried using \TYPO3\CMS\Extbase\Utility\FrontendSimulatorUtility.

Upvotes: 0

Views: 639

Answers (1)

Georg Ringer
Georg Ringer

Reputation: 7939

You should never fiddle around with getting TSFE running in the backend. That will just not really work!

As a solution, use the mentioned hook or check out that feature https://docs.typo3.org/typo3cms/extensions/core/Changelog/7.5/Feature-69459-ShowTt_contentPreviewInPageModuleViaFluid.html and return a simplified rendering!

Upvotes: 2

Related Questions