How to hide exposed sort if view return empty result? I have a view with an exposed filters and sorting. They are displayed as a separate block.

I want to hide only sorting widget if view return empty result (filters must left)

How to achieve this?

The problem is that when exposed form is rendered its view isn't executed yet - so i can't determine if view has any result.
In views-view.tpl.php, just replace this code

&lt;?php if ($exposed): ?&gt;
    &lt;div class="view-filters"&gt;
      &lt;?php print $exposed; ?&gt;
    &lt;/div&gt;
  &lt;?php endif; ?&gt;


with 

&lt;?php if ($exposed &amp;&amp; $rows): ?&gt;
    &lt;div class="view-filters"&gt;
      &lt;?php print $exposed; ?&gt;
    &lt;/div&gt;
  &lt;?php endif; ?&gt;


Cheers