Problem: Content of user function is rendered as plain text.
This is my class.aktionen.php
:
<?
class user_aktionen {
private $conf;
function main($content,$conf) {
$this->conf = $conf;
return 'test';
}
}
?>
This is my TS:
includeLibs.user_aktionen = fileadmin/templates/class.aktionen.php
lib.offers = USER_INT
lib.offers {
userFunc = user_aktionen->main
}
I have mapped lib.offers
with TemplaVoila onto a div
element. The rendered output of my HTML-Document is
<?
class user_aktionen {
private $conf;
function main($content,$conf) {
$this->conf = $conf;
return 'test';
}
}
?><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="de-DE" lang="de-DE" xmlns="http://www.w3.org/1999/xhtml">
I'm using Templavoila 1.8.0 and Typo3 4.7.10.
What I'm doing wrong?
Is it a permission problem? Should I use Templavoila 1.7 instead? I tried
$TYPO3_CONF_VARS['FE']['debug'] = '1';
$TYPO3_CONF_VARS['SYS']['devIPmask'] = '127.0.0.1'; // your real IP here
$TYPO3_CONF_VARS['SYS']['displayErrors'] = '2';
and php_flag display_errors on
in .htaccess but I don't see an error at all.
Thanks to Charles here is the solution:
Short tags (<? ?>
) are not configured on the server. Switching to <?php ?>
solved the problem.