[TYPO3-mvc] having a few problems nesting inline viewhelpers
Stephen Bungert
stephenbungert at yahoo.de
Mon Mar 19 19:37:48 CET 2012
Hello fluid users!
Here is a line from my fluid template:
<f:for each="{sbp2:sortTitle(records: {sbp2:combineTags(record: item)})}"
as="tag" iteration="tagInfo">
It causes the following error:
#1237900529: The argument "each" was registered with type "array", but is of
type "string" in view helper "Tx_Fluid_ViewHelpers_ForViewHelper"
sortTitle is a vh that sorts objects by there title, either asc or desc.
combineTags is a vh that gets an item's tags (mm records of an other object
class) and the tags from an item's associated client record, and returns
them as one array.
I can do this without error:
<f:for each="{sbp2:sortTitle(records: item.tags)}" as="tag"
iteration="tagInfo"> and have my item's tags outputted sorted by title
Or I can do this
<f:for each="{sbp2:combineTags(record: item)}" as="tag" iteration="tagInfo">
and have the for loop output the combined tags from the item and the item's
client, sorted as selected.
But what I want to do is somehow pass the result of the combineTags vh to
the sortTitle vh so that i can display the combined tags and sort them with
my sortTitle vh. How can I do this? I could set a property in my item record
to store the combined tags and just pass that to the sirtTitle vh but I was
hoping to be able to just pass the results of one vh to another.
Is this possible?
Let me know if you need to see more code/my extension or more of my template
code.
Stephen.
More information about the TYPO3-project-typo3v4mvc
mailing list