Hi All,
This is a great mod and came in super handy. I modified it slightly to have a "view all" button
outside of the drop-down menu. When you click it it will show the "all" option in the drop-down (for clarity's sake), otherwise it's not there. Here's the code and thanks Holub!
HTML Code:
<form method="POST" action="change_ppp.php" class="productsPerPage">
Show products per page
<select name="ppp" onchange="javascript: this.form.submit();">
<option value="5" {if $products_per_page eq 5}selected{/if}>5</option>
<option value="10" {if $products_per_page eq 10}selected{/if}>10</option>
<option value="20" {if $products_per_page eq 20}selected{/if}>20</option>
<option value="30" {if $products_per_page eq 30}selected{/if}>30</option>
<option value="50" {if $products_per_page eq 50}selected{/if}>50</option>
{if $products_per_page eq 100}<option value="100" {if $products_per_page eq 100}selected{/if}>all</option>{/if}
</select>
</form>
<form method="POST" action="change_ppp.php" class="viewAll">
<input type="hidden" name="ppp" value="100" />
<input type="submit" value="view all" onclick="javascript: this.form.submit();"/>
</form>