Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The output of poll_pages() is very simple:
$output = '<ul>';
foreach ($queried_nodes as $node) {
$output .= '<li>' . l($node->title, "node/$node->nid") . /*' - ' . format_plural($node->votes, '1 vote', '@count votes') .*/ ' - ' . ($node->active ?
t('open') : t('closed')) . '</li>';
}
$output .= '</ul>';
$output .= theme('pager');
return $output;
Unfortunately there's no easy way to customize the individual line display, so e.g. if you want to remove the actual vote counts there's no easy way without leaving two dashes floating in between the title & active status.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1451318-3-theme_poll_page.patch | 2.09 KB | adammalone |
Comments
Comment #1
cweagansUpdating tags per http://drupal.org/node/1517250
Comment #2
alexpottPoll is no longer part of core
Comment #3
adammaloneIs this what you had in mind?
Comment #4
adammaloneWe should also look at providing a default view for the poll page at /poll(s) too.
Comment #5
BerdirThis doesn't exist anymore, we have a view instead now.