This loop follows on from the one explained here : Displaying items with a specific keyword
<BOUCLE_exclude (ARTICLES) {titre_mot=excluded} {doublons}>
</BOUCLE_exclude>
<BOUCLE_display_non_excluded (ARTICLES) {tout} {doublons} >
<a href="#URL_ARTICLE">#TITRE</a>
</BOUCLE_display_non_excluded>
How does it work ?
- In this loop, all the job is handled by the criteria doublons. The first loop (BOUCLE_exclude) selects from among all the ARTICLES those which are tagged with keyword « excluded » (titre_mot=excluded
- The second loop (BOUCLE_display_non_excluded) displays all (tout) ARTICLES, except those which have already been selected by the previous loop, also coded with a (doublons) criteria.
- One can easily replace ARTICLES with RUBRIQUES, BREVES or SITES depending on which items are requested. When so doing, just adapt the content of « href » destination (#URL_RUBRIQUE, #URL_BREVE et #URL_SITE).
- The keyword used in this example is ’excluded’. You can easily replace it by another one you choose. Make sure not to have 2 or more keywords with the same name (’titre’) in 2 or more different keyword groups, unless of course you are intending to exclude them all.
Aucune discussion
Ajouter un commentaire
Avant de faire part d’un problème sur un plugin X, merci de lire ce qui suit :
Merci d’avance pour les personnes qui vous aideront !
Par ailleurs, n’oubliez pas que les contributeurs et contributrices ont une vie en dehors de SPIP.
Suivre les commentaires : |