Skip to content

Instantly share code, notes, and snippets.

@andypa
andypa / Create eID script for TYPO3
Last active December 15, 2015 02:19
Create eID script for TYPO3
1. in ext_localconf.php:
$TYPO3_CONF_VARS['FE']['eID_include']['bar'] = 'EXT:foo/lib/class.tx_foo.php';
2. in lib/class.foobar.php
<?php
require_once(PATH_tslib.'class.tslib_pibase.php');
$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
class tx_foobar extends tslib_pibase {
var $exclude = array('tt_news' => array(0));
$this->extPath = t3lib_extMgm::extPath($this->extKey);
$view = t3lib_div::makeInstance('Tx_Fluid_View_StandaloneView');
$view->setLayoutRootPath(t3lib_extMgm::extPath($this->extKey) . 'Resources/Private/Layouts/');
$view->setPartialRootPath(t3lib_extMgm::extPath($this->extKey) . 'Resources/Private/Partials/');
$view->setTemplatePathAndFilename($this->extPath . 'Resources/Private/Templates/File.html');
// initialize locallang
$view->getRequest()->setControllerExtensionName($this->extKey);
$view->assign('helloworld', $helloworld);