>> Go to the admin Category. On the custom design tab in Custom Layout Update section place the follwing code:
<reference name="product_list">
<action method="setTemplate"><template>catalog/product/list-only.phtml</template></action>
</reference>
<reference name="product_list_toolbar">
<action method="setDefaultListPerPage"><limit>20</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>20</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>40</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>60</limit></action>
<action method="addPagerLimit"><mode>list</mode><limit>80</limit></action>
<action method="setDefaultGridPerPage"><limit>20</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>20</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>60</limit></action>
<action method="addPagerLimit"><mode>grid</mode><limit>90</limit></action>
<action method="disableViewSwitcher" />
</reference>
>> Sometime you need to customize a product listing page. But others will be as usual.
Using this code you can call a separate page for list, toolbar, pager as follows:
<reference name="product_list">
<action method="setTemplate"><template>vendor/classified.phtml</template></action>
</reference>
<reference name="product_list_toolbar">
<action method="setTemplate"><template>vendor/toolbar.phtml</template></action>
</reference>
<reference name="product_list_toolbar_pager">
<action method="setTemplate"><template>vendor/pager.phtml</template></action>
</reference>
>> You can also change the Pager Frame length as you want. By default it set to 5.
e.g. Prev 1 2 3 4 5 Next
You can also manage it from Admin=>System=>Configuration=>Design=>Pagination=> Set value in Pagination Frame. You can do it in your new template which you have set with the above xml code.
Using this code in template/page/html/pager.phtml you can change the page frame.
<?php $this->setFrameLength(8); ?>
*********** Good Luck **********
No comments:
Post a Comment