If LoopDefined

Summary

The If LoopDefined tag checks whether the loop with the given name is defined in a template AND whether the loop has any output.

If the loop has a value or does exist, the values within the If LoopDefined tag will be displayed. Otherwise the value within the If Not LoopDefined tag will be displayed. Both tags can be used seperately.

Remarks

Notice that the If tags has to end with an EndIf tag in order to work.

Example

<!--@If LoopDefined(BOMProducts)-->
This product has BOM products.
<!--@EndIf(BOMProducts)-->

<!--@If Not LoopDefined(BOMProducts)-->
This product has no BOM products.
<!--@EndIf(BOMProducts)-->

See also

 Read about If Defined or If statements.