#RANG

The tag #RANG [1] returns, if there is one, the numerical prefix used at the beginning of the title of a SPIP object (article, section, author, keyword...)

  • New in : SPIP 1.9

Returns the numerical prefix used at the beginning of the title of a SPIP object (article, section, author, keyword...)

Reminder: Prefixes are generally used to classify objects between them. For example, to classify articles in a prescribed order, their titles can be numbered in the private area by a number followed by a period and a space: "10. First article", "20. Second article", etc.

Example of using the #RANG tag:
to display in a list only those sections whose prefix exists and is greater than or equal to 100:

<B_menu>
  <ul>
<BOUCLE_menu(RUBRIQUES) {par num titre} {titre==^[0-9]+[.][[:space:]]}>
[(#RANG|>={100}|oui)<li><a href="#URL_RUBRIQUE">#TITRE</a></li>]
</BOUCLE_menu>		
  </ul>
</B_menu>

Footnotes

[1Rang means ranking, position in French

Author rjadot Published : Updated : 20/04/23

Translations : English, français, Nederlands