SPIP

[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [vi] [zh] Espace de traduction

Download

#URL_RUBRIQUE

July 2010 — updated on : June 2010

All the versions of this article:

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.


Show the template of this page Site powered by SPIP | Translation area | Private area