[TYPO3-dev] Register namespace for ViewHelpers

Jens M. marquardt at schwarzhirsch.de
Thu Dec 17 15:26:40 CET 2015


Hello,

I have an extension with many custom ViewHelpers and it bothers me that I have to write the namespace declaration each time in the templates.

After some research I have found the way how does Fluid registered his namespace.

TYPO3\CMS\Fluid\Core\Parser\TemplateParser.php
[php]
protected $namespaces = array(
	'f' => 'TYPO3\\CMS\\Fluid\\ViewHelpers'
);
[/php]

I have tried to extend the array with a custom identifier with namespace, but it does not work.
Is there a way to register a identifier with namespace for custom ViewHelpers of an extension?

Cheers 
Jens



More information about the TYPO3-dev mailing list