Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get page header and footer preview in backend

I have created a TYPO3 plugin to add new content columns to tt_content.

I need the header and footer content for my preview page in the backend. Once i get the header and footer I can show my contents in between this. I want to insert some edit features in the content area. that is why I need the html rendered output to a php variable.

I am using templavoila.

I tried this - but got an error:

$this->cObj = t3lib_div::makeInstance('tslib_cObj');
$conf = array('userFunc' => 'tx_templavoila_pi1->main_page');
$content = $this->cObj->USER($conf);
#1316104317: The default controller for extension "myplugin" and plugin "ContentRenderer" can not be determined. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.
like image 620
coderex Avatar asked Nov 13 '22 03:11

coderex


1 Answers

You can use this TypoScript :

10 = USER
10 { 
    userFunc = tx_extbase_core_bootstrap->run
    pluginName = Pi1
    extensionName = EXTNAME
    controller = CONTROLLERNAME
    action = ACTION
}

Just replace EXTNAME, CONTROLLERNAME, ACTION.

like image 68
David 'mArm' Ansermot Avatar answered Nov 30 '22 22:11

David 'mArm' Ansermot