[SPIP] Submitted : {id_ ?}

SPIP

Article submitted

The article « {id_?}
(SPIP) » is submitted
for publication. on Thursday 15 December 2022.


{id_?}

Thursday 15 December 2022 , by jack

`

{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 writing 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_objetfields otherwise (for example forspip_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_latable?}, uninstalling this
plugin will cause a compilation error. With {id_?} criterion, the joins
are done automatically and without error whatever the plugins installed or
not.

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

— Sent by SPIP (https://www.spip.net/)

rubon199-7e493.jpg