0

I have a fluid template and i am passing an array to this fluid template. I need to manipulate that array with in that fluid template file. My aim is to print each value of that array in the template file as shown below:

<?php 

foreach($array as $value){
echo $value;
}
?>

<f:section name="main">
<f:for each="{AccordionList}" as="accordionList" key="accordionTitle">
<div class="right-catdownload">{accordionTitle}</div> 
<f:for each="{accordionList}" as="accordionListArry" key="accordionSubtitle">
</f:for> 
</f:for>
</f:section>
Cœur
  • 37,241
  • 25
  • 195
  • 267
Siva
  • 481
  • 7
  • 26
  • After searching and reading the manual i have found the solutions for this . To debug your array inside flux template all you have to do is "{myarray}" . – Siva Aug 03 '12 at 06:24
  • 3
    Ziva: you will need to write more meaningful questions, even if we'd like to help you, telling the truth I had no idea what do you wanted to ask for... – biesior Aug 03 '12 at 07:35

1 Answers1

0

As we talk about an MVC structure, there is (afaik) no way to manipulate an array within a fluid template. This should be done within your controller.

Another, "unclean" way would be a own viewHelper: http://www.t3node.com/blog/writing-a-basic-fluid-viewhelper-for-typo3/

fnagel
  • 654
  • 4
  • 11