Feature #4472
View helper namespaces should be configurable
0%
Description
Currently custom view helper namespaces can be defined in the templates like{namespace ns=\New\Namespace}
IMO it would be great to be able to configure the namespace in your package/extension configurations. That way you could easily replace custom or even fluid view helpers with your own implementation without touching the original package/extension.
Maybe we could even implement a fallback mechanism:
MyPackage: fluid: namespaces: f: F3\MyOtherPackage\ViewHelpers F3\Fluid\ViewHelpers blog: F3\MyOtherPackage\ViewHelpers
Now <f:link.action />
would try to instantiate \F3\MyOtherPackage\ViewHelpers\Link\ActionViewHelper.php
and if nout found use \F3\Fluid\ViewHelpers\Link\ActionViewHelper.php
If that fallback mechanism is too complex, it might be a possibility to override only single view helpers..
AFAIK, in FLOW3 this is already possible by adding something like
F3\Fluid\ViewHelpers\Link\ActionViewHelper: className: F3\MyOtherPackage\ViewHelpers\Link\ActionViewHelper
to Objects.yaml
. But I'm not sure if that would be the right approach here..
Related issues