Display No Results Text for Individual Field Groups in View I have a drupal view set up to show links to certain documents.  These documents are grouped by department in a Grid layout and then sorted by date.  What I want to do is if there are no results available for a particular group in the grid layout, display a no results text line for that.  I am willing to just put php generated text in the header or footer if that is an option.  I do not want to generate a page of non-sense content titled "No Results" to inject it in the grid (that's what we're doing now)...I'm trying to get it to handle itself. Hopefully this layout will demonstrate it better if it's hard to understand:


  Department Documents 
  
  Department 1
  
  04/25/2015 &lt;--(These dates are rewritten to link to documents)
  
  04/26/2016
  
  Department 2
  
  No results
  
  ...


Edit

I would rather not make this behavior global for all Grid views, if possible.  I have other grid views where I do not want to display this, it is only on this one view.
The best to do this is using theme layer. In your case,views-view-grid.tpl.php is used to display the results.

There are different ways to alter that.

Solution A: Using template preprocessors

Add this function to template.php in your theme folder.

&lt;?php
/**
 * Implements hook_preprocess_views_view_grid().
 *
 * Check if there is no result for this group and provide an appropraite message.
 *
 */
function phptemplate_preprocess_views_view_grid(&amp;$variables) {
    $view = $variables['view'];
    if ($view-&gt;name == 'YOUR_VIEW_NAME') { // Only do this for a specific view
        if (empty($variables['rows'])) {
            $variables['caption'] = t('No results.');
        }
    }
}


Solution B: Overriding the template file

Copy views-view-grid.tpl.php to your theme folder and then modify it.
You may also want to rename the template file so it would only apply to a specific view. (Learn how to find the appropriate template file name for Views).

&lt;?php

/**
 * @file
 * Default simple view template to display a rows in a grid.
 *
 * - $rows contains a nested array of rows. Each row contains an array of
 *   columns.
 *
 * @ingroup views_templates
 */
?&gt;
&lt;?php if (!empty($title)) : ?&gt;
  &lt;h3&gt;&lt;?php print $title; ?&gt;&lt;/h3&gt;
&lt;?php endif; ?&gt;

&lt;?php // We check if there is no result we print a meesage ?&gt;
&lt;?php if (empty($rows)) : ?&gt;
  &lt;?php print t('No results.'); ?&gt;
&lt;?php endif; ?&gt;

&lt;table class="&lt;?php print $class; ?&gt;"&lt;?php print $attributes; ?&gt;&gt;
  &lt;?php if (!empty($caption)) : ?&gt;
    &lt;caption&gt;&lt;?php print $caption; ?&gt;&lt;/caption&gt;
  &lt;?php endif; ?&gt;

  &lt;tbody&gt;
    &lt;?php foreach ($rows as $row_number =&gt; $columns): ?&gt;
      &lt;tr &lt;?php if ($row_classes[$row_number]) { print 'class="' . $row_classes[$row_number] .'"';  } ?&gt;&gt;
        &lt;?php foreach ($columns as $column_number =&gt; $item): ?&gt;
          &lt;td &lt;?php if ($column_classes[$row_number][$column_number]) { print 'class="' . $column_classes[$row_number][$column_number] .'"';  } ?&gt;&gt;
            &lt;?php print $item; ?&gt;
          &lt;/td&gt;
        &lt;?php endforeach; ?&gt;
      &lt;/tr&gt;
    &lt;?php endforeach; ?&gt;
  &lt;/tbody&gt;
&lt;/table&gt;