Petition page variables
| Variable | Description |
|---|---|
| content | The petition text itself, in HTML e.g. {{ page.petition.content }} |
| content_text | The petition text itself, in Text e.g. {{ page.petition.content_text }} |
| intro | Intro to petition e.g. {{ page.petition.intro }} |
| signature_name | What to call the signature (ie "signature" or "endorsement") e.g. {{ page.petition.signature_name }} |
| goal | Displays goal for petition if one is set e.g. {{ page.petition.goal }} |
| signatures_count | Total number of signatures for petition e.g. {{ page.petition.signatures_count | number_with_commas }} |
| has_goal? | Checks if the petition has a goal set e.g. |
| has_met_goal? | Checks if the petition goal has been met e.g. {% if page.petition.has_met_goal? %} |
| percent_of_goal | Percent of goal met e.g. {{ page.petition.percent_of_goal }} |
| is_volunteer? | Checks if petition is configured to ask for volunteers e.g. |
| is_image? | Ask for an image to upload? e.g. {% if page.petition.is_image? %}{% endif %} |
| require_image? | Is an image required? Like for an image only petition e.g. {% if page.petition.require_image? %}{% endif %} |
| is_address? | Checks if petition is configured to ask for an address e.g. |
| require_address? | Checks if an address is required to sign petition e.g. See page.petition.require_address? variable in is_address? example above |
| is_signed? | Checks if the user has already signed the petition e.g. {% if page.petition.is_signed? %} |
| current_signature | If the current user has signed the petition, useful for deleting it e.g. {{ page.petition.current_signature | delete_link message: "Remove signature" }} |