Feature #23853
closedArray in FLUIDTEMPLATE
0%
Description
My TS:
page.100 = FLUIDTEMPLATE page.100 { file = fileadmin/templates/fluid.html variables { myName = TEXT myName.value = Stefan Frömken customer = CONTENT customer { select { pidInList = 8 } returnArray = 1 (This could be a new option) table = fe_users } } }
My Template:<html>
<head>
<title>FLUID-Template</title>
</head>
<body>
<p>Hello: {myName}</p>
<p>This are my customers</p>
<ul>
<f:for each="{customer}" as="daten">
<li>{daten.firstname} {daten.lastname}</li>
</f:for>
</ul>
</body>
</html>
Maybe there is a possibility to return Arrays in some cObjects.
(issue imported from #M16144)
Updated by Ernesto Baschny almost 14 years ago
Nice idea, but will have to be postponed to 4.6. Thanks!
Updated by Stefan Froemken almost 14 years ago
no problem. I read in TYPO3-lists that there is less time and much to do to get 4.5 very cool :-)
Updated by Xavier Perseguers over 13 years ago
- Category deleted (
Communication) - Target version deleted (
4.6.0-beta1)
Updated by Christian Kuhn about 12 years ago
I have a similar issue:
if you have some TS like that for a extbase plugin:
plugin.tx_foo { persistence{ ... } settings { foo = bar foobar.test = {$some constant} } }
then, the extbase action controller assigns settings to the view automatically, it is available in fluid as {settings}. This feature is extremely useful!
I suggest to add a new setting to FLUIDTEMPLATE that does the same:
foo = FLUIDTEMPLATE { partialRootPath = {...} layoutRootPath = {...} variables { aCObj = TEXT aCObj.value = some text ... } settings { foo = bar } }
Updated by Gerrit Code Review almost 12 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17849
Updated by Gerrit Code Review almost 12 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17849
Updated by Gerrit Code Review almost 12 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/17849
Updated by Christian Kuhn almost 12 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 66766245c3849443d8465a181ce24d802ed861e0.
Updated by Eric Depta about 11 years ago
- % Done changed from 100 to 0
What is that settings thing?
For me it looks like completly failed!
What about things like this:
page.100 = FLUIDTEMPLATE
page.100 {
file = fileadmin/templates/fluid.html
variables {
array {
0 < styles.content.get
1 < styles.content.getLeft
}
}
}
Template:
<f:for each="{array}" as="col">
<div class="col">{col}</div>
</f:for>
Also returning selects as array would be cool as suggested.
sorry cant fix the script layout...
Updated by Stefan Neufeind over 10 years ago
@Eric: If you use "variables" everything is based on objects. For example you'll have to define a TEXT-object to pass through text to a Fluid-template. And all that you pass through to Fluid here is evaluated, there are no "values" passed or so. Fluid gets the final, generated output (text).
With "settings" you can pass through certain values unmodified and without any evaluation. This way you could for example pass
settings.person {
name = foo
pictureUrl = bar
}
through to Fluid and there decide about the output. You could use the pictureUrl (just a "string") to pass that as src to a f:image-ViewHelper.