Feature #4472
View helper namespaces should be configurable
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
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