Petition page variables
Variable Description
contentThe petition text itself, in HTML e.g. {{ page.petition.content }}
content_textThe petition text itself, in Text e.g. {{ page.petition.content_text }}
introIntro to petition e.g. {{ page.petition.intro }}
signature_nameWhat to call the signature (ie "signature" or "endorsement") e.g. {{ page.petition.signature_name }}
goalDisplays goal for petition if one is set e.g. {{ page.petition.goal }}
signatures_countTotal 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_goalPercent 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_signatureIf the current user has signed the petition, useful for deleting it e.g. {{ page.petition.current_signature | delete_link message: "Remove signature" }}
Do you like this page?

Showing 2 reactions


Jesse Haff commented 2012-02-02 13:21:46 -0800
Do you want to remove the ability for people to opt out of having their name displayed as a signer on the website, or do you want to disable the stream so names aren’t displayed at all? You can disable the stream in the settings area for the page if it’s the latter. If it’s the former, edit the template for the petition page and change this:

{% check_box “is_private”, class:“checkbox” %}

To this:

<input name=“petition_signature[is_private]” type=“hidden” value=“0” />
Peter Brown commented 2012-02-02 13:01:46 -0800
How can I remove the “Don’t Publish to Website” from the petition page? We don’t want people to do that, and therefore don’t want the box there at all.

Thanks
Loading

Theme documentation

Object reference