Since SPIP 1.9, the #CHEMIN{file.ext} tag returns the complete file path to file.ext, which may be located in the squelettes/ directory, in the folder of a plugin, at the site root, in squelettes-dist/ etc.
#CHEMIN checks completely throughout the "spip_path" in a specific order (see below) until it finds the file it is looking for:
- first of all:
- ./squelettes/
- then, in alphabetical order of the name of their directories and independently of where they are listed in auto/ or not, the plugins requiring other plugins:
- ./plugins/auto/plugin_A_requiring_plugin_X/
- ./plugins/plugin_B_requiring_plugin_Y/
- ./plugins/plugin_C_requiring_plugin_X/
- then, in no particular order, the other plugins:
- ./plugins/plugin_Y/
- ./plugins/plugin_G
- ./plugins/plugin_X/
- ./plugins/plugin_E
- then the root of the site:
- ./
- and finally, and in this order, these 3 directories:
- ./squelettes-dist/
- ./prive/
- ./ecrire/
Examples:
<link rel="stylesheet" href="#CHEMIN{the_stylesheet.css}" type="text/css" />
<img src="#CHEMIN{images/my_logo.png}" alt="" />
