Loop
Sections
Loops
A loop typically displays content retrieved from the database. It generates an optimised SQL query that extracts the desired content.
SQL joints between tables
A joint in SQL is what allows information to be retrieved from multiple tables combined in a single query. It is possible to perform certain (...)
Articles
Nested loops
It is often useful to nest loops within each other to display more complicated elements. Nesting loops in this way makes it possible to use (...)
Recursive loops
A common concept in many programming languages, an algorithm (a data-processing code) which makes reference calls to itself is described as (...)
The syntax of loops
A loop declares both a database table from which to extract information as well the criteria for selection. spip ... for each object ... (...)
Contents of parent loops
Sometimes it’s useful to retrieve contents from a loop which is a parent of the current loop, just by using an ordinary SPIP tag. SPIP offers a (...)
Retrieving the object and id_object
This article will show how to retrieve the type (object) and identifier of a loop, so that they can be used in the calculations of a tag. (...)
Modifying all of your templates in one hit
Thanks to some special hooks, it is possible to use a single simple operation on a complete set of template files to modify the behaviour of a (...)
The contents of loops (boucles)
The content extracted from the selection made by a SPIP loop is displayed by using tags. Systematically, whenever a table has an SQL field "x", (...)
Quick overview
SPIP transforms templates into static pages. Templates are mainly composed of loops () which select elements, typically sets of records, and (...)
The complete syntax of loops
Loops, like tags, have a syntax which allow them to deliver content in various combinations. Optional parts are displayed only once (not for (...)