Activity for nodes that have a specific taxonomy term

Created on 28 March 2011, over 14 years ago
Updated 29 October 2025, 6 days ago

I'm looking to implement activity messages, upon node creation or update, that are tagged with a specific taxonomy term. Nodes without the term would not generate a message. I'm looking for high level assistance on the correct coding approach for this.

Right now I'm thinking of doing a standard node insert/update template, then using hook_activity_record_alter(). Since the nid comes along with the record, I'd run a db_query into the term_node table, look for the NID+TID, and if they match create the record. If not, bail on the creation of the activity.

Does that sound about right? Or would you suggest a different and improved method of doing this? Thanks in advance.

πŸ’¬ Support request
Status

Closed: outdated

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rjbrown99

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024