This is a relatively small use case, but might make the current integration easier.
Have a theme function where you can pass through variables for title, link, text, etc. and return with a button you can add to anything programmatically. The use case here is on a site of ours we have several "highlight videos" that are youtube embed fields. We would like to add a share button to each of these where the user can share the youtube video links with their friends. Since it is on a field, we would have to do it within a preprocess function on our theme.
Why it could help: Making the creation of the share button more drupal-y... and a single call that can be used throughout to run the entire process.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 1789330-add-ability-to-use-button-programatically-1.patch | 13.66 KB | iamcarrico |
Comments
Comment #1
iamcarrico commentedHere is my go at this, and it pulls in parts of #1789232: Update theming of sign-on to use renderable arrays, to better enhance themability. and #1789218: Add in ability to change the text / icons for the social sharing widget. within it to have more broad theming capabilities. I think there can still be some more work on making it more open, but this alone will help overall usage greatly.
A few notes:
Comment #2
iamcarrico commentedAlso includes code to help with #1789214: Share widget does not display icons, but does not solve the problem.