poll-results.tpl.php

  1. 7.x drupal/modules/poll/poll-results.tpl.php
  2. 6.x drupal/modules/poll/poll-results.tpl.php

Default theme implementation to display the poll results in a block.

Variables available:

  • $title: The title of the poll.
  • $results: The results of the poll.
  • $votes: The total results in the poll.
  • $links: Links in the poll.
  • $nid: The nid of the poll
  • $cancel_form: A form to cancel the user's vote, if allowed.
  • $raw_links: The raw array of links.
  • $vote: The choice number of the current user's vote.

See also

template_preprocess_poll_results()

1 theme call to poll-results.tpl.php
poll_view_results in drupal/modules/poll/poll.module
Generates a graphical representation of the results of a poll.
6 string references to the theme hook from poll-results.tpl.php

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

drupal-6.filled.database.php in drupal/modules/simpletest/tests/upgrade/drupal-6.filled.database.php
Filled installation of Drupal 6.17, for test purposes.
poll_menu in drupal/modules/poll/poll.module
Implements hook_menu().
poll_theme in drupal/modules/poll/poll.module
Implements hook_theme().
poll_theme in drupal/modules/poll/poll.module
Implements hook_theme().
poll_view_results in drupal/modules/poll/poll.module
Generates a graphical representation of the results of a poll.

... See full list

File

drupal/modules/poll/poll-results.tpl.php
View source
  1. <?php
  2. /**
  3. * @file
  4. * Default theme implementation to display the poll results in a block.
  5. *
  6. * Variables available:
  7. * - $title: The title of the poll.
  8. * - $results: The results of the poll.
  9. * - $votes: The total results in the poll.
  10. * - $links: Links in the poll.
  11. * - $nid: The nid of the poll
  12. * - $cancel_form: A form to cancel the user's vote, if allowed.
  13. * - $raw_links: The raw array of links.
  14. * - $vote: The choice number of the current user's vote.
  15. *
  16. * @see template_preprocess_poll_results()
  17. *
  18. * @ingroup themeable
  19. */
  20. ?>
  21. <div class="poll">
  22. <?php print $results; ?>
  23. <div class="total">
  24. <?php print t('Total votes: @votes', array('@votes' => $votes)); ?>
  25. </div>
  26. <?php if (!empty($cancel_form)): ?>
  27. <?php print $cancel_form; ?>
  28. <?php endif; ?>
  29. </div>

Related topics