SPIP

[ar] [bg] [ca] [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 latest version of SPIP

SPIP 1.9.2 SPIP 1.9.2

The HIERARCHIE (Hierarchy) Loop

October 2003 — updated : April 2005

All the versions of this article:


The HIERARCHIE loop returns a list of the SECTIONS which lead from the root of the site to the current section or article.

<BOUCLEn(HIERARCHIE){criterion...}>

Selection criteria

One of the following criteria must be used to select the results:

-  {id_article} returns the list of sections from the root up to and including the section which contains the article.

-  {id_rubrique} returns the list of sections from the root up to, but not including, the identified section. Note: From [SPIP 1.8] it is possible to obtain also the identified section in the results by specifying the criterion {tout}.

These criteria — {id_article} and {id_rubrique} — cannot be used with a comparison. For example <BOUCLE_hi(HIERARCHIE) {id_article=12}> will give an error.

N.B. This loop must be placed within an outer ARTICLES or RUBRIQUES loop. It cannot “read” the id_article ou id_rubrique directly from the l’URL. (The same goes for HIERARCHIE loops in templates included using the <INCLURE(xxx.php3)> command.)

Display criteria

From [SPIP 1.8], all the criteria of The RUBRIQUES Loop (Sections) may be used with this loop, including sort criteria. (So <BOUCLE_x(HIERARCHIE){id_article}{par hasard}> is possible, for example.)

Note: With versions of Spip prior to 1.8, not all the "criteria applicable to all loops" applied to this loop. Only the criteria {"between"} and {a,b} could be used.

Tags of this loop

The HIERARCHIE loop returns sections. All the tags available in RUBRIQUES loops can therefore also be used here.


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