Poll Position: Template Tags
More Poll Position documentation:
The tags below will help you build a poll or quiz submission or results
template. Fully functional examples of these templates are found in the plugin
All of Poll Position’s tags support static publishing only; dynamic publishing is not supported. Poll tags output poll and quiz field values and results; “poll” and “quiz” can be used interchangeably in the descriptions of the tags.
poll_id, as in
<mt:CompletePoll poll_id="123">. Returns complete HTML for the specified poll. Any poll can be specified, including those with voting closed, or that are unpublished. A poll’s ID can be found on the Edit Poll page.
A block tag to enter the polls context.
poll_id, as above.
type, specifies the type of object to return. Leave this value undefined to return both polls and quizzes. Alternatively, specify
quizto filter the result.
lastn, just as it’s used within the rest of MT, to display the last “N” polls.
offset, just as it’s used within the rest of MT, in conjuction with
Returns the ID of the current poll. This is a particularly important value
because it’s integral to creating a unique form. Must be used in the
Returns the title you’ve entered for your poll. Must be used in the
Returns the question text for your poll. Must be used in the
Returns the total number of votes received for a poll, aggregating all response
counts. Must be used in the
A block tag to enter the choice context. Must be used in the
Choices are returned in the same order they are shown on the Edit screen.
Returns the id of the current choice. As with
PollID this tag is important
because it helps create a unique form. Must be used in the
Returns the text label of the current choice. Must be used in the
Returns a count of the total number of votes received by the choice. Must be
used in the
This tag returns the ID of the Choice the user selected. This tag is only useful in the Results Template, to display or highlight the response the user selected.
This tag returns the label text of the Choice the user selected. This tag is only useful in the Results Template, to display or highlight the response the user selected.
When creating a quiz the correct choice must be selected so that Poll Position can tell if the user chose properly. This tag returns the ID of the correct choice.
When creating a quiz the correct choice must be selected so that Poll Position can tell if the user chose properly. This tag returns the label text of the correct choice.
Use this tag in the Poll Position Results template to return the URL to a Google Chart. This tag uses the chart options found in the plugin’s Settings to generate the image.
Combine this tag with an
If statement to display different poll results on
your Main Index and Entry pages, for example. Supply a value in the
display_results poll form element, which gets passed into the
PollDisplayResults tag. Read more about the Results Template capabilities
This tag returns the numeric status of the poll in context. Possible values are “0” (closed for voting), “1” (open for voting) and “2” (unpublished). Use these values to control the poll display, showing only results and no voting form for polls with voting that is closed.