How to use htmlOptions for for styling CLinkPager


I am using CLinkPager for pagination in my project. I am unable to use htmlOptions to change the style of pagination generated by CLinkPager. There is no example of using htmlOptions in CLinkPager documentation. All that the document says about htmlOptions is: HTML attributes for the pager container tag.

Could someone please show an example of using htmlOptions for CLinkPager to generate following style:

<ul id="pagination">

	<li class="previous-off"><< Previous</li>

	<li class="active">1</li>

	<li><a href="#">2</a></li>

	<li><a href="#">3</a></li>

	<li><a href="#">4</a></li>

	<li><a href="#">5</a></li>

	<li><a href="#">6</a></li>

	<li><a href="#">7</a></li>

	<li class="next"><a href="#">Next >></a></li>



write style for class ‘pages’, this overrides default

Thanks Rajith,

Nice idea. But I think setting appropriate htmlOptions will allow me to do things a bit pro grammatically. I think using htmlOptions is the more appropriate way to achieve this. But I don’t know what to pass in htmlOptions to make that happen.