[TYPO3-dev] Own ViewHelper not found (extbase/fluid/6.2b1)

Dennis Luemkemann dennis.luemkemann at gmx.de
Wed Nov 6 00:00:06 CET 2013


Hello all,

I made a simple test extension with extbase/fluid on 6.2b1 using Extension Builder and I'm having trouble getting a ViewHelper to work. In the frontend, I'm getting:

#1289386765: Could not analyse class:Tx_Besuche_ViewHelpers_Nl2liViewHelper maybe not loaded or no autoloader?
TYPO3\CMS\Extbase\Object\Container\Exception\UnknownObjectException thrown in file
/Users/dennis/Sites/T3_6.2/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php in line 51.

Here's what I did:
1) Created a class file Nl2liViewHelper.php in Classes/ViewHelpers:
<?php
class Tx_Besuche_ViewHelpers_Nl2liViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper {
	public function render() {
		return "HelloWorld ".$content;
	}
}
?>

2) Used the ViewHelper in the List.html template (in Resources/Private/Templates/Visit/):
first line of template:
{namespace dlcsb=Tx_Besuche_ViewHelpers}
further down in the template:
<dlcsb:nl2li>{visit.visitors}</dlcsb:nl2li>

(visitors is a property of Visit)

Please help me, what did I miss that this doesn't work?

Thanks
Dennis




More information about the TYPO3-dev mailing list