Feature #4472

View helper namespaces should be configurable

Added by Bastian Waidelich almost 6 years ago. Updated almost 5 years ago.

Status:Closed Start date:2009-09-07
Priority:Won't have this time Due date:
Assigned To:- % Done:

0%

Category:Core
Target version:-
Has patch:

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

duplicated by TYPO3.Fluid - Feature #35766: add custom namespaces in settings.yaml Rejected 2012-04-07

History

#1 Updated by Sebastian Kurfuerst about 5 years ago

  • Status changed from New to Closed
  • Priority changed from Could have to Won't have this time

I don't think we should implement this; as one could always extend ViewHelpers through AOP if he really needs to.

So, 1 from my side ;) Please re-open if you still want to discuss :)

Sebastian

Also available in: Atom PDF