[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



August 2010 — updated on : July 2010

All the versions of this article:

-  #PETITION displays the text of the petition if its exists.

If the petition exists but the text is empty, the tag returns a space (a non-empty character string that does not have any impact on an HTML page). This makes it possible to test for the existence of a petition within an (ARTICLES) loop.

Using the example from the dist templates, the template file inc-petition.html is only included if the petition is activated for the article:

[(#PETITION|?{' '})<INCLURE{fond=inc-petition}{id_article}>]

A more elaborate example: we include the template file inc-petition.html, either if there are signatures OR if there is a petition. In fact, whenever we delete a petition using the private zone, in order to close the possibility of signing that petition, the preceding code also deletes the list of signatures.

    [(#PETITION|?{' '})

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