[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction



July 2010 — updated on : August 2010

All the versions of this article:

This tag is used to check for the existence of a plugin activated on the site, or to access all of the data stored in its plugin.xml file (no information is returned if the plugin has not been activated).

  • #PLUGIN{plugin_prefix} returns true if the plugin has been activated.
  • #PLUGIN{plugin_prefix,requested_data} returns the requested data from the plugin, such as its version number, its name, its description etc. of the plugin if it is active.
  • #PLUGIN{plugin_prefix, tout} returns all of the data from the plugin as an associative array that can be assigned to another variable so that you can display it using the |table_valeur filter.

The plugin prefix is the field entered the <prefix> XML field in the plugin.xml file which is always present at the root directory that contains the plugin’s scripts.

The most common use of the #PLUGIN tag consists of testing to see if the plugin has been activated or not before using an HTML code:

  • [(#PLUGIN{plugin_prefix}|oui) blablabla...] will display "blablabla..." if the plugin_prefix plugin has been activated.

Show the template of this page Site powered by SPIP | Translation area | Private area