Hallo
ich habe Probleme mit den Anweisungen auf Seite 22
Reading the selected template (frontend)
The next step is to use the frontend plugin as the file-reader for the Template Auto-parser instead of the FILE cObject currently used. As an initial test to see if our plugin delivers just anything I have slightly modified the file "pi1/class.tx_tmplselect_pi1.php" from our "tmplselect" extension:
require_once(PATH_tslib."class.tslib_pibase.php");
class tx_tmplselect_pi1 extends tslib_pibase {
var $prefixId = "tx_tmplselect_pi1";// Same as class name
var $scriptRelPath = "pi1/class.tx_tmplselect_pi1.php";// Path to this script ...
var $extKey = "tmplselect";// The extension key.
/**
* [Put your description here]
*/
function main($content,$conf){
$content = t3lib_div::getUrl(PATH_site.'fileadmin/template/main/template_1.html');
return strtoupper($content);
}
}
As you can see the main function of the plugin just reads the template we used in Part 1 and returns it - in uppercase!
ich bekomme in der Vorschau der Seite keinen Inhalt angezeigt.
Auch die Standard-Ausgabe wird nicht angezeigt
return 'Hello World!<hr />
Here is the TypoScript passed to the method:'.
t3lib_div::view_array($conf);
Hat jemand eine Idee woran das liegen könnte?
Grüße Nina[/quote]