Loops with missing tables

When we ask SPIP to use a table which does not exist, it displays an error on the page. These error messages help administrators to fix problems with the site, but other users get to see them as well.

Sometimes, we don’t care if a table is missing and want to ignore it silently, for example if we reference a table for a plug-in which might not be currently active. In these cases, we can place a question mark before the end of the brackets to indicate that the absence of the table is tolerated:

<BOUCLE_table(TABLE ?){criteria}>


If a template uses the “Agenda” plug-in (which includes an EVENEMENTS table for events), but which must still function even in the absence of that plug-in, it is possible to write its loops this way:

<BOUCLE_events(EVENEMENTS ?){id_article}{!par date}>

Author Thomas Sutton Published : Updated : 12/03/23

Translations : English, Español, français, Nederlands