Typo3 eID, how to access config OR fetch template from ajax file

In eID mode, only a small part of the regular TYPO3 frontend is loaded. Unfortunately TypoScript is not loaded. To still access the TypoScript configuration you need manually load the components it needs to do so. Unfortunately this can be a bit of a pain in the butt. So in some cases it might be easier to just load a page containing a single plugin that doesn’t contain anything else (without headers etc.).

If you do want to load the TypoScript templates yourself, you can try something like the following:

<?php //if (!defined (‘TYPO3_MODE’))die (‘Access denied.’);


t3lib_div::requireOnce(PATH_t3lib.’class.t3lib_userauth.php’ );
t3lib_div::requireOnce(PATH_tslib.’class.tslib_content.php’) ;

$TSFEclassName = t3lib_div::makeInstance(‘tslib_fe’);
$id = isset($HTTP_GET_VARS[‘id’])?$HTTP_GET_VARS[‘id’]:0;

$GLOBALS[‘TSFE’] = new $TSFEclassName($TYPO3_CONF_VARS, $id, ‘0’, 1, ”,”,”,”);
$GLOBALS[‘TSFE’]->tmpl->getFileName_backPath = PATH_site;
$GLOBALS[‘TSFE’]->forceTemplateParsing = 1;

class CLASS_NAME {

  protected $uid;

  public function __construct() {
      $this->cObj = t3lib_div::makeInstance(‘tslib_cObj’);

  public function main() {
      $templateFile = ‘EXT:EXTENSION_NAME/pi1/view/template.html’;
      $template = $this->cObj->fileResource($templateFile);
      $subpart = $this->cObj->getSubpart($template, ‘###TEMPLATE###’);
      $subpartArray = $linkpartArray = array();
      return $this->cObj->substituteMarkerArrayCached($subpart, $markerArray, $subpartArray, $linkpartArray);


$obj = t3lib_div::makeInstance(‘CLASS_NAME’);


// Make instance:


Good Luck….. 🙂

If you have any query then feel free to contact me at Jainish Senjaliya