Folks:
I'm wondering if there's a maximum number of if statements allowed before things fall apart.
I'm evaluating if a field has content. If no, display nothing. If yes, display whatever I say. Code:
{if segment_2 != "product1"}
{related_entries id="product2_specifications"}
<ul>
{if max_height}<li>Maximum height - {max_height}</li>{/if}
{if weight_in_lbs}<li>Weight - {weight_in_lbs}</li>{/if}
<li>Overall length of body - {body_overall_length}</li>
<li>Overall Width - {overall_width}</li>
<li>Inside Seat Width - {inside_seat_width}</li>
<li>Inside Height - {inside_height}</li>
{if legroom_length}<li>Legroom (Length) - {legroom_length}</li>{/if}
{if height_from_ground}<li>Height (from ground) - {height_from_ground}</li>{/if}
{if folded_dimensions}<li>Folded Dimensions - {folded_dimensions}</li>{/if}
{if capacity}<li>Capacity - {capacity}</li>{/if}
{if frame}<li>Frame - {frame}</li>{/if}
{if floor}<li>Floor - {floor}</li>{/if}
{if wheels}<li>Wheels - {wheels}</li>{/if}
{if platform_base_size} <li>Platform base size - {platform_base_size}</li>{/if}
</ul>
{/related_entries}
{if:else}
{related_entries id="product1_specifications"}
<ul>
<li>Maximum payload - {max_payload_product1}</li>
<li>Weight in pounds - {weight_in_lbs_product1}</li>
<li>Overall Length - {overall_length_product1}</li>
<li>Overall Width - {overall_width_product1}</li>
<li>Frame width - {frame_width_product1}</li>
<li>Inside Box - {inside_box_product1}</li>
{if platform_base_size} <li>Platform base size - {platform_base_size}</li>{/if}
</ul>
{/related_entries}
{/if}
This code works. Now, if I add a single if statement, the whole thing fails. For example, if I add:
{if inside_height}<li>Inside Height - {inside_height}</li>{/if}
to the first part, it throws an T_ENDIF error.
I've tried the ifelse plug-in with no success.
I should also note that this is a snippet placed inside a template. Template has a Switchee switch but the error also occurs with a simple if statement.
{exp:switchee variable = "{segment_2}" parse="inward"}
{case value="product2"}
{exp:channel:entries channel="product2_information"}
{product_information}
{/exp:channel:entries}
{/case}
{/exp:switchee}
where product_information is the snippet.
Could very well be an easier way to do this. If so, let me know.
Any help would be appreciated.