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.
Problem/Motivation
The links in the details block are important interface elements that are sometimes required outside of the block. The functionality can be duplicated, but if it is it will no longer be alterable via hooks.
Proposed resolution
break out the link generation into a function that returns an array that is ready for the links theme function.
Remaining tasks
Review by community. Patch is ready.
User interface changes
none.
API changes
Adds a function that can be used outside of OG that generates the links in the details block.
Comment | File | Size | Author |
---|---|---|---|
#3 | og.1512938-3.og_details_api.patch | 1.53 KB | Grayside |
#2 | OG-details-block-links.patch | 1.25 KB | mirzu |
OG-details-block-links.patch | 2.62 KB | mirzu | |
Comments
Comment #1
Grayside CreditAttribution: Grayside commentedHi mirzu, fantastic! I am very much in favor of this.
However, it appears that the patch was rolled against an older version of OG, as a result it is mostly regressions of issues fixed in the last couple months. Could you reroll the patch against the current dev version?
Comment #2
mirzu CreditAttribution: mirzu commentedHi Grayside,
Sorry didn't even look at the patch. attached is a new version that only breaks out the links without breaking everything.
Comment #3
Grayside CreditAttribution: Grayside commentedHey mirzu,
Jumped the gun a bit, wanted the API function to be a bit more versatile just on principle. Please cross-check the attached patch.
Comment #4
mirzu CreditAttribution: mirzu commentedLooks good to me. I like passing in the node just in case someone wants to so something really sneaky. :)
Comment #5
Grayside CreditAttribution: Grayside commentedhttp://drupalcode.org/project/og.git/commit/efcd00e