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

Assigned:xurizaemon» Unassigned
Status:Needs work» Needs review
StatusFileSize
new2.73 KB

Patch

Updated (trivial changes only)

Cool, thanks. Works for me.

This one adds support for on/off checkboxes too.

Works for me, but I think multi-value display should somehow be configurable like textformatter.

Marked #1063234: Content Profile Token installed but still no token. as duplicate. Also, I'm wondering what was the rationale behind the limits originally set.

What is the widget type for Taxonomy term select box or Content Taxonomy field?

Found it: add 'content_taxonomy_select' in _content_profile_tokens_allowed_widget_types array.

Regards

Category:feature» bug

Successfully 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.

I'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?

Here's a version that uses content_allowed_values to get the label if possible.

Broke single-value fields, this should work on textfields and selectboxes with labels too.

Sorry, goofed up the last patch.