Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
$307 per month—let's make that $500!Learn more
Shows the result of a given poll-id. This is basically the same as the view when voting by the PollsLatest snippet. Only this one could be viewed without having to vote.
Too use this snippet, just simple add this tag to the template or your resource content.
For some properties see the tables below.
|tpl||The main result template for the poll view||pollsLatestResultOuter|
|tplAnswer||The result template for the answers inside the outer view||pollsLatestResultAnswer|
|resultLinkVar||(Optional) When using resultResource on PollsLatest, this is the same paramatername the snippet is looking for||poll|
Within the templates for this snippet you can use the following placeholders to generate your view.
||The question id of the current poll view|
||The question text|
||The total number of votes on this poll|
||The name of the poll category (only availbale when using the category property)|
||Contains the output of the answers generated for this poll question|
||The id of the answer record|
||The answer text|
||The number of votes for this answer|
||The percentage of the number of votes for this answer|
||The datetime of the vote of the current visitor (based on IP address)|
The basic call for this snippet is without any properties. You can create a propertyset also.
[[!PollsResult? &tpl=`myVoteOuter` &tplAnswer=`myVoteAnswer` &resultLinkVar=`myPoll` ]]