#CHEMIN

#CHEMIN{directory/file.ext} returns the relative address of a file within the SPIP hierarchy. This topic is discussed in full in the article titled: The concept of path.

Example

Return the address of the "habillage.css" file. If it exists in the squelettes/ folder, that address will be provided, otherwise it will be the address of the file present in the squelettes-dist/ directory.

  1. #CHEMIN{habillage.css}

The squelettes-dist/inc-head.html file uses it to load the corresponding stylesheet into the <head> section of the HTML code. If the file is found, the HTML <link> tag is displayed.

  1. [<link rel="stylesheet" href="(#CHEMIN{habillage.css}|direction_css)" type="text/css" media="projection, screen, tv" />]

Note that the direction_css filter is used to invert the whole CSS stylesheet (left to right and vice versa) if the contents of the site are written in a human language that is written from right to left.

Author Mark Baber Published : Updated : 11/03/17

Translations : English, français