-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Allow defining arguments for f:render with f:argument #429
base: main
Are you sure you want to change the base?
Conversation
50a5a30
to
30721a5
Compare
30721a5
to
76d9e55
Compare
This patch allows you to define arguments that get passed to f:render by using f:argument inside the tag contents. ```xml <f:render partial="Something"> <f:argument name="arg1">Special value for arg1 variable</f:argument> <f:argument name="arg2">Special value for arg2 variable</f:argument> </f:render> ``` Any argument specified with f:variable this way will override the argument of the same name if it was passed in the “arguments” array as well. The combined result will be used as variables for the sub-rendering call. References: TYPO3#427
76d9e55
to
0435601
Compare
As a result of discussion:
|
Ready for another look @mbrodala (sorry about the ping, doing open-stuff-cleanups). |
Looks good from reading (and amazingly simple) but I'd like to conduct at least a simple CLI test to get a feeling for this. |
|
||
// Prepare a delegate variable provider that will be possible to extract after rendering the child closure. | ||
// Any variable defined therein gets used as argument and overrides any argument of the same name. | ||
// Note: not using late static binding here is a conscious decision: if late static binding had been used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed that this comment is no longer correct, since removing the VH scope argument from the methods it relates to.
Abandoned; would not fit with Fluid 3.0 and is not vital. |
Re-opened, there has been some interest for the feature and we should probably re-consider it. My plan is to either cross-port the API parts and functionality to the 3.0 branch, or create an identical feature there, to make 2.x and 3.x straight compatible concerning this particular feature. |
This patch allows you to define arguments that get passed to
f:render by using f:argument in the tag contents.
Any argument specified with f:argument this way will override
the argument of the same name if it was passed in the “arguments”
array as well. The combined result will be used as variables for the
sub-rendering call.
References: #427