Feature #4472

View helper namespaces should be configurable

Added by Bastian Waidelich over 12 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Won't have this time
Assignee:
-
Category:
Core
Target version:
-
Start date:
2009-09-07
Due date:
% Done:

0%

Estimated time:
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

Has duplicate TYPO3.Fluid - Feature #35766: add custom namespaces in settings.yamlRejected2012-04-07

Actions
#1

Updated by Sebastian Kurfuerst almost 12 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