*/
function getDynTabMenu($parts, $idString, $dividersToTabsBehaviour = 1) {
if (is_object($GLOBALS['TBE_TEMPLATE'])) {
+ $GLOBALS['TBE_TEMPLATE']->backPath = $this->backPath;
return $GLOBALS['TBE_TEMPLATE']->getDynTabMenu($parts, $idString, 0, false, 50, 1, false, 1, $dividersToTabsBehaviour);
} else {
$output = '';
* Extension class for "template" - used in the context of frontend editing.
*/
class frontendDoc extends template {
- var $backPath = 'typo3/';
/**
* Used in the frontend context to insert header data via TSFE->additionalHeaderData.
* @return void
*/
public function insertHeaderData() {
- $GLOBALS['TSFE']->additionalHeaderData['docStyle'] = $this->docStyle();
- $GLOBALS['TSFE']->additionalHeaderData['JSLibraries'] = $this->renderJSlibraries();
- $GLOBALS['TSFE']->additionalHeaderData['JScode'] = $this->JScode;
- $GLOBALS['TSFE']->additionalHeaderData['JScodeArray'] = $this->wrapScriptTags(implode("\n", $this->JScodeArray));
- if ($this->extJScode) {
- $GLOBALS['TSFE']->additionalHeaderData['extJScode'] = $this->wrapScriptTags('Ext.onReady(function() {' . chr(10) . $this->extJScode . chr(10) . '});');
+ /** @var $pageRenderer t3lib_PageRenderer */
+ $pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
+
+ $this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
+ $this->pageRenderer->setBackPath($this->backPath);
+ $this->docStyle();
+
+ // add applied JS/CSS to $GLOBALS['TSFE']
+ if ($this->JScode) {
+ $pageRenderer->addHeaderData($this->JScode);
+ }
+ if (count($this->JScodeArray)) {
+ foreach ($this->JScodeArray as $name => $code) {
+ $pageRenderer->addJsInlineCode($name, $code);
+ }
+}
+
+ if ($this->addPrototype) {
+ $pageRenderer->loadPrototype();
+ }
+ if ($this->addScriptaculous) {
+ $pageRenderer->loadScriptaculous();
+ }
+ if ($this->addExtJS) {
+ $pageRenderer->loadExtJs();
+ }
+ if ($this->inlineLanguageLabels) {
+ $pageRenderer->addInlineLanguageLabelArray($this->inlineLanguageLabels);
+ }
+ if ($this->inlineSettings) {
+ $pageRenderer->addInlineSettingArray($this->inlineSettings);
}
}
}