how can you include CCK fields in the notifications that go out?

Currently the notifications only include:
Title
Author
Link to node
Body text

And the /node page does show the CCK fields added to content in the node listing...and those fields are shown in the body as well. It shouldn't have to be defined in the notify.module as every node type would have different/custom CCK fields...

Comments

epop’s picture

Id like to see an answer to this question so that notify and cck can become a serious web form to e-mail solution.

matt2000’s picture

Assigned: Unassigned » matt2000
Category: support » feature
Priority: Normal » Minor

Webform module is a pretty serious web form to email solution...

But it shouldn't be too hard to have notify include whatever output would normally be included when displaying the node. I'll keep it under consideration.

You may also want to look into subscriptions module if you want something more flexible.

Dokuro’s picture

Thanks for the fast reply,

If I have a cck field called field_can_you_relocate, asking them if they can relocate?

Would I do it as I have below?

function phptemplate_job_mail($job_node, $job_user, $resume_node, $resume_user) {
  global $base_url;

  $site = variable_get('site_name', 'drupal site');
  $subject = t("[$site] [Job application] for [$job_node->title] by [$resume_user->name]");
  $body  = t("The following user has applied for the above job.\n");
  $body .= t("\nJob: @title",                          array('@title'  => $job_node->title));
  $body .= t("\nJob URL: @url",                        array('@url'    => $base_url . url("node/$job_node->nid")));
  $body .= t("\nApplicant name: @name",                array('@name'   => $resume_user->name));
  $body .= t("\nApplicant email: @email",              array('@email'  => $resume_user->mail));
  $body .= t("\nApplicant URL: @url",                  array('@url'    => $base_url . url("user/$resume_user->uid")));
  $body .= t("\nResume: @title",                       array('@title'  => $resume_node->title));
  $body .= t("\nResume URL: @url",                     array('@url'    => $base_url . url("node/$resume_node->nid")));
  
  $body .= t("\nCan you relocate:",                     array('@relocate' => $resume_node->field_can_you_relocate));
  
  $body .= t("\n\nManage job applications at @manage", array('@manage' => $base_url . url("job/applications")));

  return(array(
    'subject' => $subject,
    'body'    => $body,
    ));
}

Again thanks,

CKD

gisle’s picture

Status: Active » Closed (duplicate)

This feature request for CCK fields seems to be a duplicate of #70959: Configurable notification emails.