title: how to know if grid or list view is active with custom magento page
body: <p>I have a custom product list page and i´m using the following code to show the pagenumbering and filters:</p>
  
  <pre><code>$pager = $this-&gt;getLayout()-&gt;createBlock('page/html_pager');
  echo $this-&gt;getLayout()-&gt;createBlock('catalog/product_list_toolbar')-&gt;setChild('product_list_toolbar_pager', $pager)-&gt;setCollection($products)-&gt;toHtml();
  </code></pre>
  
  <p>If i'm changing the mode from grid to list view nothing happens.</p>
  
  <p>How can i get the active mode (grid or list).</p>
  
  <p>Magento normaly uses $this->getMode() but this one doesnt work.</p>