If you don't use the standard install profile, or if you decide to manually create a body field for a specific content type, changes are big that the field 'body' does not exist. However, Notifcations hard-coded the [node:summary] token in the module, which is empty.

How to fill [node:summary] with another field? Or do I need to make my own classes to override Notifications_Node_Insert_Template?

Comments

scor’s picture

Have you tried to alter the node:summary token in this particular context by implementing hook_tokens_alter?

BarisW’s picture

Title: How to override [node:summary] to use another fields » Support other fields to be used as summary using the interface
Category: support » feature

I ended up using <php? hook_notifications_message_alter() ?>, where I did a <php? $content['teaser'] = '[node:field_discussion_body]'; ?>.

So I'll change it into a Feature Request for now, 'cause it would be very nice if the interface let you choose which field to use as teaser.