SPIP

[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [sv] [tr] [vi] [zh] Espace de traduction

Download

The BREVES Loop (news items)

September 2003 — updated : April 2005

All the versions of this article:


The BREVES loop, as its French name indicates, returns a list of news items.

The selection criteria

We will use one of the following criteria to indicate how we will select the element:

-  {tout}, i.e. "all", will select all the news items available on the site.

-  {id_breve} returns the news item identified by id_breve. Since the identifier of each news item is unique, this criterion will return one or naught response.

-  {id_rubrique} returns all the news items available in the current section (rubrique).

-  [SPIP 1.2] {id_mot} returns all the news items linked to the current keyword (inside a MOTS loop, for instance).

-  [SPIP 1.3] {titre_mot=xxxx}, or {type_mot=yyyy} returns the news items linked to the keyword named "xxxx" or the keyword group named "yyyy". Warning, you cannot use the criteria {titre_mot=xxxx} or{type_mot=yyyy} several times in the same loop.

-  [SPIP 1.4] {id_groupe=zzzz} returns the news items linked to a keyword part of a given group; it is the same technique {type_mot}, but since we’re working with an identifier (a group number ), the syntax will be more "clean".

-  {lang} selects the news items in the language requested in the page’s address.

-  {recherche} i.e. search, returns the news items matching the words entered in the search interface (search engine incorporated to SPIP). For more information, see the page on the search engine.

Display criteria

The criteria common to all loops apply here.

Tags of this loop

-  Tags retrieved from the database

The following tags represent the items retrieved from the database (as opposed to those that are "calculated" and are explained later). You can also use them as sorting criterion (usually: {par titre}, i.e. by title).

-  #ID_BREVE returns the unique identifier of the news item.

-  #TITRE returns the title of the news item.

-  #DATE returns the publishing date of the news item.

-  #TEXTE returns the text of the news item.

-  #NOM_SITE returns the name of the site given as the reference for the news.

-  #URL_SITE returns the URL of the site given as the reference for the news item.

-  #ID_RUBRIQUE returns the unique identifier of the section (rubrique) in which this news item is located.

-  #LANG returns the language of the news item. By default, this is the language of the sector in which the news item has been published.

-  Tags calculated by SPIP

The following elements are calculated by SPIP. (They cannot be used as sorting criterion.)

-  #NOTES returns the footnotes (calculated from the analysis of the text).

-  #INTRODUCTION the first 600 characters of the text, the typographical embellishements (bold, italic, ..) are removed.

-  #URL_BREVE is the complete URL of the news item’s page.

-  #FORMULAIRE_FORUM creates the forum interface of the news item.

-  #PARAMETRES_FORUM creates the list of variables used by the form interface to post on the forum of the newsitem. For instance: [<A HREF="forum.php3?(#PARAMETRES_FORUM)">Reply to this news item</A>]

-  The Logo

-  #LOGO_BREVE displays the logo of the news item and the hovering logo if it is applicable.

The logo is inserted thus:

.. where alignment is right, left or centre.

-  #LOGO_BREVE_RUBRIQUE displays, the logo of the news item, if it exists; if there is no logo, SPIP displays the logo of the section (rubrique) [SPIP 1.4].


ٍShow the template of this page Site created with SPIP | Translation area | Private area

Urgent : vos articles ne s’affichent plus ce matin ? Un correctif est disponible