Closed (fixed)
Project:
Dynamic display block
Version:
6.x-1.0-rc6
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2009 at 00:27 UTC
Updated:
17 Nov 2009 at 10:38 UTC
I am using the Dynamic Display block to show article nodes and I would like to include the Plus1 Voting widget on the slider text panel.
I can display the widget using print plus1_jquery_widget($node,0,0);
but the as the $node argument is not displayed in the URL the widget does not function.
Anyone know how I can pass the node id of the active slide into this function?
Comments
Comment #1
ppblaauw commentedYou can change the following line:
to
In the ddblock content preprocess function in the template.php file of the theme you use.
Now the $slide_node variable is available in the ddblock theme
In the ddblock theme file: ddblock-cycle-pager-content-[theme_name].tpl.php you can no use:
Hope this helps you further, please let me know.
PS.
I put the version to RC6, Dev version is for testing new functionality.
Comment #2
teh_catt commentedthanks for the reply.
I still couldnt use the $slide_node variable in the .tpl.php - it came up empty but I could see the correct result of
print $slider_item['slide_node']Unfortunately this didn't work when passed to the plus1_jquery_widget and the widget retruned the same result for all nodes. I think this is an issue with Plus1 rather than DDB so I will ask there as well.
Many thanks for our help and for the great Dynamic Display Block module which after mcuh blood sweat & tears is looking great!
Comment #3
teh_catt commentedComment #4
ppblaauw commentedOk, I misread the code for the plus1 widget, probably it needs the whole node object instead of the node-id.
Which module is used for the plus1 functionality.
Comment #5
teh_catt commentedIt is this one:
http://drupal.org/project/plus1
You can see it on my DDB here:
http://community.retrobabble.com
It should show the number of votes for each node and have an 'UP' arrow if a user hasnt voted.
At the moment it only shows one vote for each item and doesnt work if you click the UP arrow to vote.
If you click through to the full node you can see it works correctly on the full node page.
Comment #6
ppblaauw commentedI had a look at the plus1 module and you need to pass the whole $node object, not just the node Id.
You can accomplish this by loading the node in the preprocess function.
Comment #7
teh_catt commentedYou sir, are a hero!
That works perfectly now.
Many many thanks for taking the time to help me! :-D