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.
Is there any way to add this exra field on other entites like paragraphs ?
Comment | File | Size | Author |
---|---|---|---|
#5 | addtoany-entity-all-2919756-5.patch | 3.58 KB | Musa.thomas |
#4 | addtoany-entity-all-2919756-4.patch | 4.13 KB | Musa.thomas |
#3 | addtoany-entity-all-2919756-3.patch | 3.6 KB | Musa.thomas |
Comments
Comment #2
Musa.thomasComment #3
Musa.thomasHere a quick patch to available on all entity. I know it's not optimized and we should have settings (in admin form or I think the best is to have checkbox option per bundle when you edit it).
Comment #4
Musa.thomashere the patch for the 1.8
Comment #5
Musa.thomasThe patch #4 have some issue with composer.json
Comment #7
micropat CreditAttribution: micropat commentedThanks for the initial patches! Commit ba8deeb in the dev branch is optimized similar to what you suggested. A new hook is introduced to make the addtoany extra/pseudo-field available to other entity types. Usage example in a custom module:
The new hook was favored over new checkboxes in AddToAny settings because we'd like to avoid overcomplicating the options. Patches are welcomed if there are ideas for elegantly exposing the many bundles & entity types in AddToAny settings. Perhaps a form field that autocompletes multiple entity IDs, or some better approach?