Stronach Posted June 5, 2017 Share Posted June 5, 2017 Hello, I'm having an issue enabling numbered pagination for search result, such as when searching for query without using Ajax, if I use /search/?q=example the pagination shows /search/2/, /search/3/ etc without specifying the actual query and when I use /search/example/ the pagination shows /search/example/2/ and so on and so forth but just shows a 404 error. How would I fix this? Thanks. Quote Link to comment Share on other sites More sharing options...
Tech Support Posted June 5, 2017 Share Posted June 5, 2017 Please submit a support ticket for this and specify your project domain, so that we have a look. Quote Link to comment Share on other sites More sharing options...
Rick Posted June 13, 2017 Share Posted June 13, 2017 I actually encountered this as well some time ago, but figured it could wait since it's only important for a future re-design. So is it possible to use it without ajax? Quote Link to comment Share on other sites More sharing options...
Tech Support Posted June 14, 2017 Share Posted June 14, 2017 It can only be used without ajax for pages which have only videos list or albums list. In KVS default theme search page renders both videos and albums. It needs to be decomposited to render only one list at once, then pagination can be configured without ajax. Here is an example. Currently search works via this URL: http://domain.com/search/query/ So the pagination should be: http://domain.com/search/query/2/ http://domain.com/search/query/3/ But since there are both videos and albums rendered, KVS will not know which list to paginate. Paginating both lists is not an option, since one of the lists will have less items than another and thus KVS will start showing 404 errors starting from some page number. There can be 2 solutions for this problem in site design: 1) Render both videos and albums and instead of pagination control on the first page render "Show more" button, which will for videos go to videos search page #2 and for albums will go for albums path #2, e.g.: http://domain.com/search/videos/query/2/ http://domain.com/search/albums/query/2/ These pages will render only videos or albums. This can be achieved within 1 page by template manipulations and using custom GET parameter to indicate search type. Then in template code check if this parameter == videos, then render only videos block with pagination, if this parameter == albums then render only albums block with pagination. If this parameter is not videos nor albums, then render both videos and albums blocks with "Show more" buttons instead of pagination. 2) Add search scope selector to search textbox so that user can initially select whether they want to search videos or albums. In this case javascript should be adjusted to change form URL to either http://domain.com/search/videos/query/ or http://domain.com/search/albums/query/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.