The #URL_ARTICLE tag displays the relative URL (i.e the address without the http://domain_name.ext/ part) for the article referenced by an ARTICLES loop.

This tag is therefore used to generate links: <a href="#URL_ARTICLE"> ... </a> independently of the configuration choice made for the type of URLs for the site.
The HTML source returned could be in the form of:

  • spip.php?article146 (page)
  • Article_title.html (propres2)
  • article146.html (html)
  • ...

Any time that you change the URL mode, the tag will always generate the right kind of URL.

Outside of an ARTICLES loop, it is possible to request the generation of the URL for a specific article by passing its ID as an argument to the tag: #URL_ARTICLE{44} will therefore displays the appropriate URL for the article with ID=44.

Author Mark Published : Updated : 26/10/12

Translations : عربي, català, English, Español, français, Nederlands, русский, Türkçe, українська