How to add an icon before (or after) the node title if a field is filled? I'm a newbie in Drupal and I want to add an icon before (or after) the node title, if the node have a 'field_fav' filled. I know it can be done using preprocess functions, but I don't know how to append the title's  with the class I desired. Any how to?

Found this : Optionally add image/icon after node title based on boolean content type field? but it only for boolean type value.
I found your answer on drupal.org.

function mytheme_preprocess_page(&amp;$variables) {
  $titleFile = 'myicon.png';
  $titleImage = base_path() . path_to_theme() . "/images/titles/" . $titleFile;

  $newTitle = $variables['title'].' &lt;img alt="' . $variables['title'] .'" src="' . $titleImage.'" /&gt;';
  $variables['title'] = $newTitle;    
}