[TYPO3-mvc] How to use my own ViewHelpers in Extbase 6.x using namespaces?
Felix Eggbert
eggbert at phez.com
Thu Jun 6 15:29:35 CEST 2013
Hey guys,
I am in the process of updating an extension to namespaces in extbase
introduced in v6 (?).
I was wondering what's the right way to implement my own viewhelper now? My
old viewhelpers still work like this
BlablaViewHelper.php:
----------------------------
> class Tx_MyExt_ViewHelpers_BlablaViewHelper extends
Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper
Template:
-------------
{namespace myext=Tx_MyExt_Viewhelpers}
and
<myext:blabla/>
On the interwebs I read about the new way of using namespaces here, too but
I don't seem to get it to work. This was my approach:
BlablaViewHelper.php:
----------------------------
class BlablaViewHelper extends
\TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractViewHelper
Template:
{namespace myext=\MyVendor\MyExt\Classes\ViewHelpers}
and
<myext:blabla/>
But it doesn't get rendered in fluid, instead the naked tag is rendered
("<myext:blabla/>" right in the output). As if the namespace declared in the
Fluid template is not recognized.
Can anybody explain to me how this is done correctly or what I am doing
wrong?
Thanks a lot and best regards,
Felix
More information about the TYPO3-project-typo3v4mvc
mailing list