There's an exposed hook available exposing additional merge fields so that any contrib module can do just that. This will not be part of the core module, but anyone can write a contrib module. E.g., the original 5.x version had a mailchimp_bio module which did this if you want to see an example.
I encountered a similar problem, and the noble [Ximo](http://drupal.org/user/88701) helped me to build a mini-module to fix integration with two content profile fields.
The result is attached. It will obviously have to be changed to match the node type and field names for any other project.
FYI all: I just enabled the "Content Profile Tokens" module that comes with Content Profile - then the CCK profile fields were available in the settings for the Mailchimp module.
Itangalo, I tested your mini-module but it didn't work for me: the content profile isn't still created when I call your function to set the token values. That's strange because modules' weight is correct. For example:
I didn't mean your mini-module creates a new content profile. I just meant: inside your function, when content_profile_load() is called, it seems profile isn't still created. Despite weight's modules are right, "content profile registration" is called the last one. Would you know what could be causing this?
I didn't mean your mini-module creates a new content profile. I just meant: inside your function, when content_profile_load() is called, it seems profile isn't still created. Despite weight's modules are right, "content profile registration" is called the last one. Would you know what could be causing this?
@sercagil: Oh, sorry – now I get what you mean. (I would say that the profile is loaded, not created.)
I don't know what's causing this, but I know that the content_profile_load() takes an argument that should be the (machine) name of the profile node type. Could that be it?
It is also likely that you don't have to solve this, since the Content Profile Tokens solves the problem for you.
I want to sync a content profile date field but it's not available as a merge field. The text fields I've added to the profile content type are there, but not the date field.
Any ideas why all content profile fields wouldn't be available?
Comments
Comment #1
levelos CreditAttribution: levelos commentedThere's an exposed hook available exposing additional merge fields so that any contrib module can do just that. This will not be part of the core module, but anyone can write a contrib module. E.g., the original 5.x version had a mailchimp_bio module which did this if you want to see an example.
Comment #2
ChrisBryant CreditAttribution: ChrisBryant commentedThat makes sense, thanks for the reply!
Comment #3
ChrisBryant CreditAttribution: ChrisBryant commentedComment #4
Itangalo CreditAttribution: Itangalo commentedI encountered a similar problem, and the noble [Ximo](http://drupal.org/user/88701) helped me to build a mini-module to fix integration with two content profile fields.
The result is attached. It will obviously have to be changed to match the node type and field names for any other project.
All cred to Ximo!
Comment #5
Jim Kirkpatrick CreditAttribution: Jim Kirkpatrick commentedFYI all: I just enabled the "Content Profile Tokens" module that comes with Content Profile - then the CCK profile fields were available in the settings for the Mailchimp module.
No custom code needed.
Comment #6
sercagil CreditAttribution: sercagil commentedItangalo, I tested your mini-module but it didn't work for me: the content profile isn't still created when I call your function to set the token values. That's strange because modules' weight is correct. For example:
user = 0
content_profile = 2
mini_module = 4
mailchimp = 10
Would you know how to fix this?
Thanks in advance,
Sergio
Comment #7
Itangalo CreditAttribution: Itangalo commented@sercagil: The code doesn't create any new content profiles – only exposes token values from content profile to Mailchimp.
(And, as Jim Kirkpatrick correctly points out, this is already handled by the Content Profile Tokens module included in the Content Profile project.)
Comment #8
sercagil CreditAttribution: sercagil commentedItangalo,
I didn't mean your mini-module creates a new content profile. I just meant: inside your function, when content_profile_load() is called, it seems profile isn't still created. Despite weight's modules are right, "content profile registration" is called the last one. Would you know what could be causing this?
Comment #9
sercagil CreditAttribution: sercagil commentedItangalo,
I didn't mean your mini-module creates a new content profile. I just meant: inside your function, when content_profile_load() is called, it seems profile isn't still created. Despite weight's modules are right, "content profile registration" is called the last one. Would you know what could be causing this?
Comment #10
Itangalo CreditAttribution: Itangalo commented@sercagil: Oh, sorry – now I get what you mean. (I would say that the profile is loaded, not created.)
I don't know what's causing this, but I know that the content_profile_load() takes an argument that should be the (machine) name of the profile node type. Could that be it?
It is also likely that you don't have to solve this, since the Content Profile Tokens solves the problem for you.
Comment #11
Poieo CreditAttribution: Poieo commentedHey Guys,
I want to sync a content profile date field but it's not available as a merge field. The text fields I've added to the profile content type are there, but not the date field.
Any ideas why all content profile fields wouldn't be available?