Bug #6742

If / For ViewHelper nesting issue

Added by Frank Mey almost 12 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
ViewHelpers
Target version:
-
Start date:
2010-03-09
Due date:
% Done:

100%

Estimated time:
Has patch:

Description

Hi,

I tried to implement this control structure in a Fluid section:

...

<f:if condition="{datasheet.strUserLang} == ESPE">

      <p>Overall Project Data:</p>
      <a href="{datasheet.dateipfad}.xlsx">Excel 2007</a><br />
      <a href="{datasheet.dateipfad}_2003.xlsx">Excel 2003</a><br /><br />
      <p>country-specific project data:</p>

      <f:for each"{datasheet.arrProjLang}" as="foo"><p>Download your Excelsheets (2007/2003) for country {foo}:</p><a href="{datasheet.dateipfad}_{foo}.xlsx">Excel 2007</a><br /><a href="{datasheet.dateipfad}_{foo}_2003.xlsx">Excel 2003</a><br />
      </f:for>

 </f:if> 

...

Fluid throws an error :

Tx_Fluid_Core_Parser_Exception

Templating tags not properly nested. Expected: Tx_Fluid_ViewHelpers_IfViewHelper; Actual: Tx_Fluid_ViewHelpers_ForViewHelper

Isn't it possible to nest if-constructs with for each - loops by now ?

#1

Updated by Frank Mey almost 12 years ago

plz delete this msg, stupid typo :S

#2

Updated by Frank Mey almost 12 years ago

  • % Done changed from 0 to 100
#3

Updated by Bastian Waidelich almost 12 years ago

  • Status changed from New to Closed

I guess, the problem was the missing "=" after "<f:for each"
But again, the exception is not very helpful here.. With #4704 that might change, cause the error message could highlight the erroneous lines of your template..

Also available in: Atom PDF