0

I have used the core Search Page functionality in Drupal 8 to built a search engine on my site. The pager is displayed at the bottom by default. How can i display the pager on the top also?

Note: I have not used views to built the search page.

Thanks!

0

You could use CSS

.[wrapping-div-class] { position: relative; }
.[wrapping-div-class] .pager { position: absolute; top: 0px; }
  • Thank you for your reply. But i need the pager BOTH on top and bottom. Any idea?? – d8ninja Feb 23 '17 at 14:04
0

You can add a custom page template for your search results page and then print the pager above the {{content}}

You can use the template name suggestions as listed here

Twig template naming conventions - Drupal 8

You can also use a preprocess function to duplicate the pager in the render array

Preprocessing output in Drupal 8 - Acquia

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.