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
Using the example from the dist templates, the template file
inc-petition.html is only included if the petition is activated for the 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.