#URL_RUBRIQUE

The #URL_RUBRIQUE tag displays the relative URL (i.e. without the protocol and domain name part: http://nom_domaine.ext/) for the section returned by a RUBRIQUES or ARTICLES loop.

This tag is therefore used to create links like<a href="#URL_RUBRIQUE"> ... </a> quite independently of the configuration choice that has been made for the type of URLs for the site.
The value returned could be any one of:

  • spip.php?rubrique18 (page)
  • -Titre_de_la_rubrique-.html (propres2)
  • rubrique18.html (html)
  • ...

Any time that the type of URLs is changed, the tag will always return the right URL according to the type selected.

Outside of a RUBRIQUES or ARTICLES loop, it is possible to obtain the URL value for a specific section by passing that section’s ID as an argument to the tag: #URL_RUBRIQUE{12} will then return the URL corresponding to the section with ID = 12.

Author Mark Published : Updated : 13/07/23

Translations : català, English, Español, français, Nederlands