• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Parser loop not working if you have 2 identical loops with slightly different code

#1
[eluser]iKode[/eluser]
I hope that title was descriptive enough, the parser does not seem to work in this case

Code:
<p>Male Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="m_id_{id}"  /&gt; <label for="m_id_{id}">{label}</label></p>
{/age}

<p>Female Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="f_id_{id}"  /&gt; <label for="f_id_{id}">{label}</label></p>
{/age}

It will render the first loop , but not the second. if I do the following ( obviously its wrong to have 2 identical label ids ) the parser will work.

Code:
<p>Male Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="id_{id}"  /&gt; <label for="id_{id}">{label}</label></p>
{/age}


<p>Female Age</p>
{age}
<p>&lt;input type="checkbox" name="search[]"  value="{id}" id="id_{id}"  /&gt; <label for="id_{id}">{label}</label></p>
{/age}

The only difference I see is that inside of the loop is different. This is the output:



Male Age
18-24
25-29
30-39
40-49
50+


Female Age
{age}
{value}
{/age}


Any ideas?

#2
[eluser]popovich[/eluser]
This question is quite old, but it is on my list right now. Any workarounds or tips?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.