The MOTS Loop (Keywords)

The MOTS loop returns a list of keywords.

The selection criteria

You should use one of the following criteria to indicate which keywords are selected.

-  {tout}, i.e. "all", selects all keywords from the whole site.

-  {id_mot} returns the keyword identified by the unique id_mot.

-  {id_groupe} returns the keywords associated with the keyword group numbered id_groupe. [SPIP 1.4]

-  {id_article} returns the keywords associated with this article (this is the most common use of this loop).

-  {id_rubrique} returns the keywords associated with this section. [SPIP 1.4]

-  {id_breve} returns the keywords associated with this news item. [SPIP 1.4]

-  {id_syndic} returns the keywords associated with a referenced site. [SPIP 1.4]

-  {id_forum} returns the keywords associated with a forum message. [SPIP 1.4]

-  {titre=france} returns the keyword named france (for example).

-  {type=country} returns the keywords from the keyword group named country (for example).

The display criteria

You can use any of the criteria applicable to all loops.

Tags for this loop

-  Tags retrieved from the database

The following tags correspond to attributes of the keywords retrieved directly from the database. You can generally use them as sorting criteria as well (for example {par titre} by title).

-  #ID_MOT returns the unique identifier of this keyword.

-  #TITRE returns the title (the keyword itself).

-  #DESCRIPTIF returns the description of the keyword.

-  #TEXTE returns the text associated with the keyword.

-  #TYPE returns the name of the keyword group to which this keyword belongs (for example, the keyword "France" could be associated with the keyword group named "Country").

-  #LOGO_MOT [SPIP 1.4] returns the logo associated with this keyword. (N.B. since SPIP 2.1, there has been a new syntax for passing arguments to #LOGO_XX style tags)

-  #URL_MOT gives the address (URL) of the page dedicated to this keyword.

The GROUPES_MOTS Loop (Keyword Groups)

The GROUPES_MOTS loop [SPIP 1.5] is of a marginal use but deserves to be quoted here. If you have several keyword groups, the loop makes it possible to select these groups and to organize, for example, a summary page of all the keywords classified alphabetically by group with the following code:

The tags and criteria associated with this loop are:
-  #ID_GROUPE, the identifier of the keyword group (also available in the MOTS loop);
-  #TITRE, the name of the group (inside the MOTS loop you can use #TYPE to display this value).

Author Paul Knight Published : Updated : 26/10/12

Translations : عربي, català, Deutsch, English, Español, français, italiano, Nederlands, українська