# How to paginate a subdirectory?

**URL:** <https://zola.discourse.group/t/how-to-paginate-a-subdirectory/749>\
**Category:** Uncategorized\
**Created:** [January 11, 2021, 3:35pm UTC](https://zola.discourse.group/t/how-to-paginate-a-subdirectory/749 "2021-01-11T15:35:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![thomasweitzel](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/thomasweitzel/32/1011_2.png) [@thomasweitzel](https://zola.discourse.group/u/thomasweitzel)\
**Post date:** [August 28, 2023, 11:10am UTC](https://zola.discourse.group/t/how-to-paginate-a-subdirectory/749/4 "2023-08-28T11:10:19Z")

</div>

I stumbled across the same problem: I have a `/content/blog` section also, and want `templates/index.html` to paginate over it. Doing a `get_section(path="blog/_index.md")` doesn’t get you a paginator. It has a property `pages` though, over which you can iterate.

The comment by Zola’s author keats with `transparent = true` in the `_index.md` located in the `blog` section was the most helpful one so far. Now I have a paginator. Everything seems fine. And it actually is.

But, one caveat for me: I had pages like `about.md`, `imprint.md`, etc. under `/content`, which are now also used for the paginator. Implementing some filter logic didn’t work, because of `date` and `sort_by` issues - leaving out some pages in the middle while having a `paginate_by` leads to ugly results.

I ended up with all my pages in its own section: `/content/pages`, which led to a cleaner template implementation.

---

_[View the full topic](https://zola.discourse.group/t/how-to-paginate-a-subdirectory/749)._
