This content has been marked as final. Show 7 replies
On way to achieve this if you are using Experience manager/Page builder in your application is to configure the number of records to return per page (default value can be set and a range of value can be given to choose) in Cartridges. This way Work bench user can configure this property.
With CRS aplication this is implemented in MainContent-ResultsList.xml cartridge. You could refer CartridgeDevGuide.pdf/XMgrDevGuide.pdf for more details on cartridge development.
I'm not sure why are not able to access the doc. Basically you use No & navNum query parameters to control pagination. One is the offset and the other tells how many results to be returned. You can implement pages on these parameters along with totalNumERecs. If you have access to endeca_jspref you refer the pagination implementation.
This can be easily achieved using setNavNumERecs() and setNavERecsOffset().
setNavNumERecs() - This is for the number of records to be displayed per page ( current page ).
setNavERecsOffset() - The parameter for this method sets the value of the starting record for the current page.
As any endeca query this query will be StateLESS too. As user selects the next or previous button , change the value of the NavERecsOffset accordingly and hit the MDEX with new query . Query can be maintained in query cache.
If we need to give flexibility to the end user to select number of records per page , we need to change the value of NavNumERecs accordingly and hit the MDEX.
P.S. - Other regular pagination logics like displaying the last page, displaying the first page if the total num of records is less than NavNumErecs etc. need to be taken care of.