Forcing joins

SPIP’s automatic detection capabilities are sometimes limited, and so two syntax variants are offered for forcing table joins or the fields of the tables to be used.

// forcing a particular table
<BOUCLE_table(TABLE1 table2 tablen){...}>
// forcing a field in a table


These two loops select articles where an author has a name containing "na" (like "Diana", "Joanna", etc.).

<BOUCLE_art(ARTICLES auteurs_articles auteurs){nom==na}{0,5}>
- #TITRE / #NOM<br />
<hr />
- #TITRE / #NOM<br />

Note, however, there is a considerable difference between these examples: at present, only the first one declaring all of the tables will make it possible to display a field #FIELD from another table. Therefore, #NOM will only be provided in the first loop.

Author Mark Baber Published : Updated : 30/05/10

Translations : English, français