How to insert conditions into Global Custom Text? I am new to drupal and getting hang of it. I have a custom text in one of my view and I need to display the title based on a condition.
This is what I have right now,

 &lt;h1&gt;[title] | [field_annual_number] &lt;/h1&gt;


But I need to display this only if the title doesn't contains the work "multi".
So basically, the pseudo code is like this,

if([title].contains('multi')) then &lt;h1&gt; [title] &lt;/h1&gt; else &lt;h1&gt; [title] | [ Field_annual_number] &lt;/h1&gt;


Any help would be appreciated.
TIA.
Srividhya
Add the following code to the bottom of your template.php file (located in /sites/all/themes/yourtheme/ folder)

function themename_preprocess_views_view_fields($vars){

      if ($vars['view']-&gt;name == "view_name" &amp;&amp; $vars['view']-&gt;current_display == "block_1"){

        if (strpos($vars['fields']['title']-&gt;content, 'multi') !== false) {
          $vars['fields']['title']-&gt;content = "&lt;h1&gt;" . $vars['fields']['title']-&gt;content . "&lt;/h1&gt;";
        } else { 
          $vars['fields']['title']-&gt;content = "&lt;h1&gt;" . $vars['fields']['title']-&gt;raw . "|" . $vars['fields']['field_annual_number']-&gt;raw . "&lt;/h1&gt;";
       }

      }

    }



replace themename with your theme name
replace view_name with your view name
replace block_1 with your machine name


Once you update your template.php file, don't forget to clear/flush your cache in Drupal to see changes.