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.
Hello! I started using advpoll.
I would like to integrate advpoll into panels, i.e. when calling a node of the type advpoll, panels should take care of the presentation through pages.
Until now I managed this by using selection rules and choosing here the node type I want to display through pages.
But advpoll has also additional views, like results. These are not catched by the pages selection rules.
How can I, using for instance the selection rules, catch all the advpoll content to display it through pages?
Thanks
Comment | File | Size | Author |
---|---|---|---|
#4 | copri_content_type.inc_.txt | 4.52 KB | tchase |
Comments
Comment #1
iadegesso CreditAttribution: iadegesso commentedSame need. Is there a way to format an advanced poll with panels?
Comment #2
pavlosdan CreditAttribution: pavlosdan commentedI needed to display advpoll content with Panels as well but the fields being made available in "Node" were not displaying the full Poll widget with the Ajax functionality etc.
What I did to make the Poll show up and work in panels was:
In a custom module you can define a ctools content plugin as described here: http://internetdevels.com/blog/ctools-content-type. Thanks @brunodbo for the link and idea.
Then in your plugin file enter the following:
The above will make an advpoll plugin available in the Node category of Panels. Adding that on your Panel overriden node will make the AdvPoll show up in your node. The code for the render part of this to make the poll appear was taken and adapted from hook_node_view of advpoll.module.
Comment #3
tchase CreditAttribution: tchase commentedThis worked great for me for "approval" voting behavior, but it does not work for the ranking poll behaviors. I'm not a php programmer (had a colleague make the module described above for me), so I apologize if the solution is obvious. Is there a tweak to the above for ranking polls I can do, or is this much more complicated? Thanks.
Comment #4
tchase CreditAttribution: tchase commentedAttached is a solution to #3 following the same procedure in #2 by incorporating the advpoll_ranking_node_view code from the advpoll_ranking.module into the same ctools-content-type outlined above.
Comment #5
tripper54 CreditAttribution: tripper54 commentedRolling this into the respective modules makes sense.
Patches welcome!
Comment #6
tripper54 CreditAttribution: tripper54 commented