Author Topic

Hans Melis

Wednesday 15 February 2006 11:40:25 pm

Comment45282

André,

A section does not loop unless the "loop" parameter has been specified. Only using the "show" parameter makes it a conditional statement. The old documentation is not always right. Anyways, section has been deprecated as of 3.6 and the new control/looping structures should be used.

Trygve,

You can use an if statement instead of a switch to compare the string and the array. Your switch construct checks if a $CourseTypeID is in the $ListCourseTypesID array. This can be done in a more elegant way with an if statement:

{if $ListCourseTypesID|contains( $CourseTypeID )}

Why the switch doesn't work when inside an if-block is not clear to me without trying it. But try the if I mentioned to see if that alleviates the problem.

Hans
http://blog.hansmelis.be