How to conditionally display some things in the message text created by the Message module?
I couldn't figure out how to do this what I thought was the "right" way - that being inside the message type itself. 

Instead, I added a preprocess field from DisplaySuite and put that into my display. 

function mytheme_preprocess_message(&amp;$variables) {
    $message = $variables['elements']['#entity'];
    if (isset($message) &amp;&amp; $message-&gt;type == 'my_custom_message' &amp;&amp; isset($message-&gt;field_foo) &amp;&amp; array_key_exists(LANGUAGE_NONE, $message-&gt;field_attachment_themed)) {
        $html = $message-&gt;field_fooLANGUAGE_NONE][0]['value'];
        $variables['parsed_output'] = $html;
    }
}


Then I just named my preprocess field parsed_output, and it now displays exactly how I want, and I can add whatever custom code I want to my preprocess_message().