It would be really useful to add the node type to the Heartbeat stream. For example, for "add_node" activity we have something like this:

<div class="heartbeat-activity odd heartbeat-activity-1773 heartbeat_add_node">

What would be the best way to add something like:

<div class="heartbeat-activity odd heartbeat-activity-1773 heartbeat_add_node node-webform">

Thanks!

Comments

Stalski’s picture

Status: Active » Closed (fixed)

I think the best way would be to add a preprocessor. You can check the one in heartbeat ...
I looks like:

/**
* Process variables for heartbeat-activity.tpl.php.
*/
function yourmodule_preprocess_heartbeat_activity(&$variables) {
$variables['classes_array'][] = $message->variables['node_type'];
}
the module could be a theme as well.
How you get to the node_type property is up to you. You should dsm(devel module) what you get from the variables ...
Happy coding :)