Accessing pagination data in the front matter #2580
-
|
I currently have the following setup: default.html (my main layout file) gallery-breast-augmentation.html (using pagination) Doing this generates pages with the following permalinks But, the same thing doesn't happen to the <title> I would like the title to output the following When I do just Any ideas? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
If you're lucky, it might be as simple as: ---
layout: default.html
pagination:
data: dynamic.gallery.breast-augmentation
size: 1
permalink: "gallery/breast/breast-augmentation/{{ pagination.pageNumber | plus: 1 }}/"
eleventyComputed:
title: "Check out this before & after result of our breast augmentation patient #{{ page.pageNumber | plus: 1 }}"
--- |
Beta Was this translation helpful? Give feedback.
permalinkis special.For other stuff you'll need to use
eleventyComputed.If you're lucky, it might be as simple as:
--- layout: default.html pagination: data: dynamic.gallery.breast-augmentation size: 1 permalink: "gallery/breast/breast-augmentation/{{ pagination.pageNumber | plus: 1 }}/" eleventyComputed: title: "Check out this before & after result of our breast augmentation patient #{{ page.pageNumber | plus: 1 }}" ---