[SPIP] PUBLISHED : #CHEMIN

SPIP

Article validated

The article « #CHEMIN (https://www.spip.net/en_article5099.html) » was
validated by George.


#CHEMIN

Friday 2 September 2022 , by jack ,
Mark

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.

Table of contents

  • See also

#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 at the root of the site:
    • ./
  • and finally, and in this order, these 3 directories:
    • ./squelettes-dist/
    • ./prive/
    • ./ecrire/

Examples:

[

<link rel="stylesheet" href="

(


#CHEMIN


{style.css}


)

" type="text/css" />

]


[

<img src="

(


#CHEMIN


{images/my_logo.png}


)

" alt="" />

]

See also|Back to the table of contents

#CHEMIN_IMAGE (https://www.spip.net/ecrire/?exec=article&id_article=6537)

Les filtres

Programmer.spip.net
The concept of path (https://programmer.spip.net/The-concept-of-path)

— Sent by SPIP (https://www.spip.net/)

rubon199-7e493.jpg