Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination not working on file inside of _layouts directory #227

Open
samsmithvlg opened this issue Oct 28, 2021 · 1 comment
Open

Pagination not working on file inside of _layouts directory #227

samsmithvlg opened this issue Oct 28, 2021 · 1 comment

Comments

@samsmithvlg
Copy link

samsmithvlg commented Oct 28, 2021

Hi!

I am attempting to use pagination on a layout inside of the "_layouts" folder, but when I run the local server in Terminal, it does not seem to be recognizing the layout as a valid pagination page.

At the top of my layout file "testing-sessions-set.html" I have:
pagination:
enabled: true
collection: testing-sessions

As far as I understand, this means that when I do {% for session in paginator.posts %}, it should be looping through the files in my "_testing-sessions" folder. Right now, inside of the loop it is spitting out nothing.

Am I missing something here? Is pagination on a layout file possible?

Thanks!

@samsmithvlg samsmithvlg changed the title Pagination not working on file inside if _layouts directory Pagination not working on file inside of _layouts directory Oct 28, 2021
@wookdev
Copy link

wookdev commented Feb 12, 2022

It needs to be specified in the front matter of the markdown or html file that calls the layout.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants