Proposé : Nouvelle traduction : #RANG

**SPIP**

# Article proposé

L’article "**Nouvelle traduction : #RANG**
(https://www.spip.net/ecrire/?exec=article&id_article=6520)" est proposé
à la publication depuis le lundi 28 octobre 2019.

* * *

## Nouvelle traduction : #RANG

lundi 28 octobre 2019 , par [rjadot](.././?page=auteur&id_auteur=7644&)

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

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 from the private space by a number followed by a period and a
space : "**10. **First article", "**20. **</i>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>

— Envoyé par SPIP (https://www.spip.net/)

rubon143-b1fe1.jpg