Um nochmal aufzuzeigen, was ich genau möchte:
Ich will eine Extension erstellen, bei der ich im Backend bestimmen kann, welche Funktion auf den einzelnen Seiten, auf die ich das Plugin geladen habe, angewendet werden soll.
Hier dann mal mein Ansatz dazu:
Code:
function main($content,$conf) {
$this->conf=$conf; // Storing configuration as a member var
$this->pi_USER_INT_obj = 1; // Disable caching
$this->pi_setPiVarDefaults(); // Set default piVars from TS
$this->pi_loadLL(); // Loading language-labels
$this->pi_initPIflexForm(); // Init FlexForm configuration for plugin
$this->templateCode = $this->cObj->fileResource($this->conf['templateFile']);
$this->bookshelf = $this->cObj->getSubpart($this->templateCode, "###BS Output###");
switch($this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'what_to_display')){
case 'SWITCH_DS':
$content.=$this->switch_ds();
break;
case 'SHOW_DS':
$content.=$this->show_ds();
break;
}
/*$content.= $this->bookshelf();*/
return $this->pi_wrapInBaseClass($content);
} Code:
function switch_ds() { ...
return $content;
} Code:
function show_ds() {
return $content;
} Möglich, dass es Probleme mit der getFFvalue gibt, da diese eigentlich bisher nur mit flexforms ohne Reiter funktionierte.
Bitte Hilfe!