Skip to content
Daniel Huf edited this page Nov 13, 2018 · 5 revisions

Example usage:

    $view = $this->objectManager->get(\Saccas\Mjml\View\MjmlBasedView::class);
    $view->setFormat('html');
    $view->setControllerContext($controllercontext);
    $view->setTemplate($templatename);
    $view->setPartialRootPaths([
        0 => 'EXT:yourExtension/Resources/Private/Partials/',
        100 => 'EXT:yourOtherExtension/Resources/Private/Partials/'
    ]);

    $view->assign('value', $value);
    $view->render();

Know problems:

"Could not analyse class: "Saccas\Mjml\Domain\Renderer\Renderer" maybe not loaded or no autoloader? Class Saccas\Mjml\Domain\Renderer\Renderer does not exist"

This issue is fixed with this https://github.com/saccas/mjml-typo3/blob/77118af9302cce3074116129334f929c225da532/ext_localconf.php#L7. So just clean the caches in the Install tool with "Clear all caches including PHP opcode cache" or try to disable and re-enable the extension in the extension manager.

Clone this wiki locally