Returning code in views search tpl but ONLY if user clicked 'search' button and results were returned I have a Views-based search page on my site. I've created a views-view-search--tpl.php file to customize the order of elements on the page. I have a specific block I'd like to return but ONLY if a user has already clicked the search button and results were returned.

Here's the code I'd like to return based on that condition:

  &lt;?php if ($feed_icon): ?&gt;
   &lt;div class="feed-icon"&gt;
    &lt;?php print $feed_icon; ?&gt;
   &lt;/div&gt;
  &lt;?php endif; ?&gt;


I guess I probably need an 'if' statement or something before that block but I'm not sure how to reference if results and/or if user clicked the search button...

Anyone know how to do this?
This should probably be done in a pre-processor rather than a template file, but I'll stick to the question as asked, for now:

&lt;?php if (!empty($view-&gt;exposed_input) &amp;&amp; !empty($rows)): ?&gt;
 &lt;?php if ($feed_icon): ?&gt;
  &lt;div class="feed-icon"&gt;
   &lt;?php print $feed_icon; ?&gt;
  &lt;/div&gt;
 &lt;?php endif; ?&gt;
&lt;?php endif; ?&gt;