Feature #23853
closed
Added by Stefan Froemken about 14 years ago.
Updated about 6 years ago.
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)
Nice idea, but will have to be postponed to 4.6. Thanks!
no problem. I read in TYPO3-lists that there is less time and much to do to get 4.5 very cool :-)
- Category deleted (
Communication)
- Target version deleted (
4.6.0-beta1)
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
}
}
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- % 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...
@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.
- Status changed from Resolved to Closed
Also available in: Atom
PDF