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 am using dispaly suit to display my fields of node, so when i show the node, i don't see the plus one button. If i don't use display suit the button show up.
Any help will be appreciated.
Comment | File | Size | Author |
---|---|---|---|
#7 | plus1-all-view-modes-1536202-7.patch | 2.65 KB | nbucknor |
#6 | plus1-all-view-modes-1536202-6.patch | 2.85 KB | wwhurley |
#3 | plus1-all-view-modes.patch | 2.91 KB | nbucknor |
#1 | Screen shot 2012-04-26 at 3.05.49 PM.png | 24.59 KB | nbucknor |
Comments
Comment #1
nbucknor CreditAttribution: nbucknor commentedYou can create a custom preprocess field with "plus1_widget" as the machine name:
http://example.com/admin/structure/ds/fields/manage_preprocess
Once you do that, you can put that Plus1 field anywhere in your display suite layout.
Comment #2
wjackson CreditAttribution: wjackson commentedAll you have to do is give it a machine name of "plus1_widget"? I created a preprocess field attempting to load Plus1 with no luck.
Comment #3
nbucknor CreditAttribution: nbucknor commentedIf the view mode you've enabled it on is either the "Teaser" or the "Full content", and those view modes are also enabled in your Plus1 config settings (admin/config/user-interface/plus1), then it should work without any code changes.
I don't think it will work on other view modes without patching the Plus1 module or creating your own hook_node_view() function to create the 'plus1_widget' variable for other view modes.
I created a patch that exposes all view modes to the Plus1 configuration settings, but haven't had time to clean up the code and recontribute it. You can use it if you want.
Comment #4
Spark_man CreditAttribution: Spark_man commentedWorked perfectly for me - it was a little tricky setting the machine name correctly, but once done, it behaved beautifully.
Thanks!
Comment #5
rogical CreditAttribution: rogical commentedIt's not a git patch, please re-roll, I'll commit this.
Comment #6
wwhurley CreditAttribution: wwhurley commentedAttached is a re-rolled patch based on #3.
Comment #7
nbucknor CreditAttribution: nbucknor commentedfixed and re-rolled patch using latest dev version of module
Comment #8
rogical CreditAttribution: rogical commentedset rtbc first
Comment #9
rogical CreditAttribution: rogical commentedcommitted