I am using the standard forum module that comes with Drupal 8. The problem is, when I view a forum node, it shows the pager the bottom. I want the pager to also appear at the top.

The closest I've been able to come is editing the "comment--comment_forum.html.twig" template. If I put random text at the top of this template, then I can see the text appearing at the right spot I want. But if I put this:

{{ pager }}

Then nothing shows. So the comment--comment_forum.html.twig template doesn't know what "pager" is.

Does anyone know where the correct place is to add a pager to the top of forum posts?

1 Answer 1


Pager is known within the "views-view.html.twig" file: /core/modules/views/templates/views-view.html.twig

If you are using a contributed or custom theme you can override that file and move the pager output where you'd like. So your new file would live here: /themes/custom/MY_THEME/templates/views-view.html.twig" for example.

As near as I can tell there's no setting for this in core currently, although it's been requested.

See also: https://api.drupal.org/api/drupal/core%21modules%21views%21templates%21views-view.html.twig/8.7.x


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.