-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
What Can The Paginator Paginate? #30
Comments
It paginates pages in a collection. Any collection of pages. The blog skeleton has a good example of this. Images are available per-page, and are an array that you can loop over easily in twig. |
You know I just had a thought. If you have a simple set of pages, that have no content, only a image associated with each page, you could paginate over image that way. You could create a pretty flexible image gallery or portfolio that way. |
So, somewhat like a blog listing page has a number of blog post snippets on each of many paginated pages, this would allow a collection of .jpg files, for instance, to be paginated in that same way? You could pick, say 12 images per page and generate the pagination off that? |
No i actually mean that each image would have its own page. You paginate over pages in a collection still, but the page could have little or no content, and your twig template, just displays the first image it finds for the page, ie By having each image in their own page, with their own folder, you can easily write a description (the page content) or add specific headers to the page to provide functionality like tags, meta data etc. |
What you could also do is to create a simple plugin which turns images into pages and registers those to the Pages class (to the router). Those pages could them be used just like any other page. |
Grav has a paginator plug-in (pagination.php) that will divide "articles' into desecrate pages.
Does it work only with .md files or can it paginate a group of images files that are displayed in a
<ul>
and individual<li>
s?The text was updated successfully, but these errors were encountered: