Conditional displays

The charger() or traiter() functions can indicate if the form is editable or not in their responses. This provides a means of receiving an editable parameter in the template, which can be used to hide or display the form as desired (but not the error or success messages).

It is used like this [(#ENV{editable}) ... contents of the <form> ... ]:

For any loops in the form

If there is a SPIP loop inside the code [(#ENV{editable}) ... ] (or any other tag), the SPIP compiler returns an error (or incorrectly displays the page) since this feature has not been envisaged in the current version of the template language.

To remediate this, you need to either:

put the loop in an include, and then call it using an <INCLURE{fond=mon/inclusion} />