Loops


The loop - The process with multiple repeating of some pre-defined actions.

In CTPP there are two types of loops, which accomplish straight passage on the massif of the data. The loop operation statements are the constructions of the form of <TMPL_loop> and <TMPL_foreach>.

Historically first exist construction is <TMPL_loop> and it was analogous used in the projects based on module Perl HTML::Template agreements. Sense of this construction - in a maximally syntactically simple access to output data. If only simple data output inside the body of loop is required, this construction is most suitable. Detailed description of this type of cycles is accessible in Ordinary loops.

In such a case whe is nessesary the output of the compound loops, which include the inserted loops, for more convenient there will be access through named iterators <TMPL_foreach>. Information through the use of this construction is found in the division Loops with iterators


Copyright © 2003 - 2010 CTPP Dev. Team | http://ctpp.havoc.ru