#URL_ECRIRE

The #URL_ECRIRE tag generates the URL of a private area script if it exists.

  • New in : SPIP 1.9

This tag allows you to write links to the ?exec scripts in the private area.

Thus, [<a href="(#URL_ECRIRE{unscript})"> ... </a>] will call /ecrire?exec=unscript.

If the script does not exist (i.e. if there is no file of the name indicated, in the exec directories known to SPIP and the installed plug-ins), this tag returns nothing, and consequently the whole template extract above will return the empty string. This is very convenient for producing a link only if the plug-in that responds to it is installed.

It is possible to complete the URL with a Query-String, by giving it as a second argument to the tag:

#URL_ECRIRE{formulaires_voir,id_formulaire=#ID_FORMULAIRE}

If there is a need to pass more than one parameter, it is also possible to use the filter parametre_url

With no arguments, this tag returns the URL of the home page of the private area.

For information on ecrire Extending SPIP

To generate a URL for the public area, use #URL_PAGE

Author jack Published : Updated : 02/07/23

Translations : English, français, Nederlands