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.
We had a need for the following to get some Content Profile data across to Mailchimp.
Current module supports only widgets 'number' and 'text_textfield', and only for single-item fields.
We wanted support for a few more widget types and for multiple-value fields as a comma-sep list.
Comments
Comment #1
xurizaemonPatch
Comment #2
xurizaemonUpdated (trivial changes only)
Comment #3
mrfelton CreditAttribution: mrfelton commentedCool, thanks. Works for me.
Comment #4
mrfelton CreditAttribution: mrfelton commentedThis one adds support for on/off checkboxes too.
Comment #5
djdevinWorks for me, but I think multi-value display should somehow be configurable like textformatter.
Comment #6
PinoloMarked #1063234: Content Profile Token installed but still no token. as duplicate. Also, I'm wondering what was the rationale behind the limits originally set.
Comment #7
vojvotkinja CreditAttribution: vojvotkinja commentedWhat is the widget type for Taxonomy term select box or Content Taxonomy field?
Comment #8
vojvotkinja CreditAttribution: vojvotkinja commentedFound it: add 'content_taxonomy_select' in _content_profile_tokens_allowed_widget_types array.
Regards
Comment #9
Ken Hawkins CreditAttribution: Ken Hawkins commentedSuccessfully applied this patch to get better token support.
Also as the module description is "Add user tokens for content profiles." the existing module would seem at best partially complete, moving this to a bug report as the intended behavior does not occur, thus a bug.
Comment #10
djdevinI'm looking at this patch and I don't think this takes into account using the value label, if you have key|value pairs in your allowed values. For example we have "md|M.D." and only the lowercase md ends up in the token.
I'm actually not sure why anyone would want the key instead of the label (possibly numeric) so maybe we should provide the label and fallback to the key?
Comment #11
djdevinHere's a version that uses content_allowed_values to get the label if possible.
Comment #12
djdevinBroke single-value fields, this should work on textfields and selectboxes with labels too.
Comment #13
djdevinSorry, goofed up the last patch.