{id_?}

  • New in : SPIP 4.0

{id_?} criterion allows all possible joins to be made with environment variables. It therefore behaves as many criteria {id_xxx ?} as possible for the given loop.

For example the loop <BOUCLE_liste(ARTICLES){id_?}>... will be understood as <BOUCLE_liste(ARTICLES){id_article?}{id_rubrique?}{id_secteur?}{id_trad?}{id_mot?}{id_document?}>..., varying according to the possible links, and therefore according to the active plugins. The syntax is therefore much more concise.

For a loop on a given table, the links created take into account:
-  the link table if it exists (for example spip_mots_liens for spip_mots)
-  objets,id_objet fields otherwise (for example for spip_forum).

Keys objet,id_objet

On a table with the fields objet and id_objet (as spip_forum), both the {objet?} criterion and the {id_objet?} criterion will be applied.

Installing and uninstalling plugins

{id_?} criterion allows to write identical loops whatever the active plugins. Indeed, some plugins create tables and allow additional conditional joins on these tables, but if we integrate these joins in a loop using the identifier of this table {id_table?}, uninstalling this plugin will cause a compilation error. With {id_?} criterion, the joins are done automatically and without error whatever the plugins are, installed or not.

See also
-  criterion ?
-  The syntax of SPIP’s loops <BOUCLE_cond(ATABLE?)>

Author jack Published :

Translations : English, français