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.

  1. // forcing a particular table
  2. <BOUCLE_table(TABLE1 table2 tablen){...}>
  3. // forcing a field in a table
  4. <BOUCLE_table(TABLE){table.field}>



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

  1. <BOUCLE_art(ARTICLES auteurs_articles auteurs){nom==na}{0,5}>
  2. - #TITRE / #NOM<br />
  3. </BOUCLE_art>
  4. <hr />
  5. <BOUCLE_art2(ARTICLES){auteurs.nom==na}{0,5}>
  6. - #TITRE / #NOM<br />
  7. </BOUCLE_art2>


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