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.
Currently in 7.x-4.x the Gigya ShareBar is implemented as a field, so it only can be used on node displays. We need to be able to share arbitrary Drupal pages with Gigya, so would like to be able to provide it as a block also.
I believe this could be done via some abstraction of the code from the field formatter so that it could be called inside a block view callback as well as a field formatter. I plan on working on this in the next day or so, unless you do the necessary work first.
Comments
Comment #1
gambaweb CreditAttribution: gambaweb commentedyou can use nodeblock http://drupal.org/project/nodeblock to achieve that.
Comment #2
EvanDonovan CreditAttribution: EvanDonovan commentedThis seemed to be a workaround, so I wrote a small module to implement this. I will share the code shortly.
Comment #3
johnlutzHi EvanDonovan. Can you provide the small module you came up with? Thanks.
Comment #4
saltednutThe comment in #1 is definitely a work-around. One does not always want to use the gigya share bar on a node.
One can set up a view mode for nodes to be used in Views and the share bar will show up there. However, if you want to use Fields, I don't believe the share bar works for that.
In addition, if one were to make a Views or a Panels page and they just wanted to drop in sharing for that specific page, you would need a re-usable block that could be configured and put on different pages. Gigya could provide a Bean (Re-usable block entity) for this case.
Comment #5
Saaj CreditAttribution: Saaj commentedAre there any updates on this? I agree with #4 a bean or block would be very handy.
Comment #6
gambaweb CreditAttribution: gambaweb commentedFor Panels you can use this https://drupal.org/project/fieldable_panels_panes
We would take the Bean (#4) option under consideration for the next version.
Comment #7
saltednutI am not sure how FPP would help here. I still would need a Gigya field that supported more than just Nodes, correct?
Comment #8
gambaweb CreditAttribution: gambaweb commentedIt would let you create panels with Gigya fields.
Comment #9
saltednutBut the configuration settings for a gigya field widget, last I checked, was tied entirely to node-based assumptions. Is this no longer the case?
Comment #10
saltednutI just checked on this, installing the latest version of this module. The field widget settings provide tokens, but only for nodes. So if I am to put this field on a FPP and use tokens, I can only use ones for nodes. But FPP can be used on Panels pages that are not nodes. Therefore there's no context to pull from. I'd have a similar problem if I put this on any first class entity that is fieldable that is not a node. Sure, you can PUT this field on a non-node, but it will not function correctly because it assumes nodes are being used.
Comment #11
Gigya CreditAttribution: Gigya commentedWe added support for Drupal Panels in version 7.4-4.6 - you can now add the Gigya plugins to panels.
Read more here:
http://developers.gigya.com/015_Partners/030_CMS_and_Ecommerce_Platforms...
Comment #12
Gigya CreditAttribution: Gigya commentedComment #13
saltednutWhat about Drupal regions, like on sites that do not use Panels? Is there a block for that? Can I add a Gigya to a View now?
The Panels bit is great, don't get me wrong, but it doesn't solve the issue reported by @EvanDonovan.
Comment #14
Gigya CreditAttribution: Gigya commentedBlocks are supported as well. For more info see -
"http://developers.gigya.com/015_Partners/030_CMS_and_Ecommerce_Platforms...(Blocks_.26_Fields)"