Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I'd like to add a simple drupal_alter() so that we can alter the widget type based on information in the node object.
I see this as a reasonable stopgap for the Drupal 6.x-3.x branch since #793048: Per content configuration is postponed.
My motivation is to have a single site using Vote Up/down with 2 different widgets depending on the node type.
Comment | File | Size | Author |
---|---|---|---|
#3 | 1398942-vote_up_down_node_widget_alter.patch | 2.52 KB | ezra-g |
vote_up_down_node_widget_alter.patch | 1.18 KB | ezra-g | |
Comments
Comment #1
marvil07 CreditAttribution: marvil07 commentedSounds pretty reasonable.
Please move the this documentation to
vud_node/vud_node.api.php
and I could push your patch.Comment #2
marvil07 CreditAttribution: marvil07 commentedActually there are some other places where we should add the alter too:
Comment #3
ezra-g CreditAttribution: ezra-g commentedThanks for the fast review!
Here's a re-roll with slightly updated documentation.
I left out altering
vud_node/vud_node.module:88: '#default_value' => variable_get('vud_node_widget', 'updown'),
since that's where we set the default and the purpose of the new hook is to alter the default on a per-node basis.Thanks!
Comment #4
marvil07 CreditAttribution: marvil07 commentedSorry for the delay here. Thanks for the patch, added to 6.x-3.x.