Predefined tags

We have already seen that we can use tags to extract data from the environment or from an SQL table. There are also some other tags which have their own explicitly defined functions.

In such cases, these functions are declared (within SPIP) either in the ecrire/public/balises.php file, or in the ecrire/balise/ directory

Here are a few examples:

  • #NOM_SITE_SPIP : returns the name of the site
  • #URL_SITE_SPIP : returns the site URL (without the final /)
  • #CHEMIN : returns the path of a file #CHEMIN{javascript/jquery.js}
  • #CONFIG : enables site configuration data to be retrieved (often stored in the "spip_meta" SQL table) e.g. #CONFIG{version_installee}
  • #SPIP_VERSION : displays the current version of SPIP
  • ...

We will see many more such examples in the following articles.

Author Mark Baber Published : Updated : 12/05/17

Translations : English, Español, français