This project is read-only.

How to show 2 pagers

Topics: General, Writing modules
Mar 25, 2013 at 6:10 PM
Hi All,

I need to show 2 pager controls, one at the top and one at the bottom (which is currently there), how could I get another one at the top?

Mar 25, 2013 at 6:53 PM
Adding another Pager shape should do the trick.
Mar 26, 2013 at 1:29 PM
I had thought of that since I posted but haven't had chance to try it yet - but wouldn't the placement file mean they would both appear in the same place, and as they are the same shape how would I use the placement to put them in different places?
Mar 26, 2013 at 5:56 PM
Override the Shape Template

Add another @Display(Model.Pager) to the markup.
Mar 27, 2013 at 11:24 PM
Edited Mar 27, 2013 at 11:24 PM
Yeah that works, but a potential issue is that rendering the same shape twice causes any shape table providers to be run twice as well, and you can't know what modules are doing to shapes. I've seen this happening with other shapes that I wanted to render twice. In my case, CSS classes were added twice. Not a biggie, but not very clean either.