SPIP

[ar] [ast] [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 SITES Loop (or Syndication)

October 2003 — updated : April 2005

All the versions of this article:


The SITES loop [SPIP 1.3] returns a list of referenced sites. If referenced sites are syndicated, this loop is also associated with a SYNDIC_ARTICLES loop which makes it possible to retrieve a list of articles from these sites.

Before version 1.3 of SPIP, this loop was named SYNDICATION because only syndicated sites could be referenced. The two versions are exactly the same, but "SITES" corresponds better to the fact that, since version 1.3, it is about a system of referencing sites, the syndication being optional.

Selection Criteria

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

-  {tout} returns all referenced sites.

-  {id_syndic} returns the referenced site identified by id_syndic.

-  {id_rubrique} returns the sites referenced in this section.

-  {id_secteur} returns the sites referenced in this sector.

-  {id_mot} [SPIP 1.3] returns the sites related to the current keyword (inside a MOTS loop).

-  [SPIP 1.3] {titre_mot=xxxx}, or {type_mot=yyyy} returns the sites related to the keyword named "xxxx", or related to keywords in the keyword group named "yyyy". Note, you cannot use several {titre_mot=xxxx} or {type_mot=yyyy} criteria in the same loop.

-  [SPIP 1.4] {id_groupe=zzzz} allows you to select the sites related to a keyword group; effectively the same as {type_mot} above, but since an identifier (number of the group), the syntax of the internal code will be cleaner.

Display Criteria

You can use the criteria applicable to all loops.

-  {moderation=oui} [SPIP 1.4] displays the syndicated sites whose links are initially blocked pending moderation; the reverse of this criterion is {moderation!=oui}.

-  [SPIP 1.3] {syndication=oui}, {syndication=non} makes it possible to display only the referenced sites that are subject to syndication, or which are only referenced without being syndicated.

Tags of this loop

-  Tags retrieved from the database

The following tags correspond to the elements retrieved directly from the database. You can also use them as sorting criteria (in general: {par nom_site}).

-  #ID_SYNDIC is the unique identifier of the syndicated site.

-  #NOM_SITE is the name of the syndicated site.

-  #URL_SITE is the address (URL) of the syndicated site.

-  #DESCRIPTIF is the description of the syndicated site.

-  #ID_RUBRIQUE is the section number containing this syndication.

-  #ID_SECTEUR is the sector number (section within the root of the site) containing this syndication.

-  Other tags

-  #LOGO_SITE returns the logo assigned to the site.

-  #URL_SYNDIC returns the address (URL) of the syndication file of this site.


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