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

Standard data model for individual templates, items in a collection, pages in pagination #338

Closed
zachleat opened this Issue Dec 9, 2018 · 3 comments

Comments

Projects
None yet
3 participants
@zachleat
Copy link
Collaborator

zachleat commented Dec 9, 2018

Per @paulrobertlloyd documentation:

Individual Template Collection Item or Pagination Item
page.url item.url should be item.page.url
page.date item.date should be item.page.date
page.inputPath item.inputPath should be item.page.inputPath
page.outputPath item.outputPath should be item.page.outputPath
page.fileSlug item.fileSlug should be item.page.fileSlug
content or layoutContent (only available in layouts) item.templateContent should be item.content
title item.data.title should be item.title
foobar item.data.foobar should be item.foobar

https://www.11ty.io/docs/collections/#individual-collection-items-(useful-for-sort-callbacks)

@zachleat

This comment has been minimized.

Copy link
Collaborator

zachleat commented Dec 9, 2018

This repository is now using lodash style issue management for enhancements. This means enhancement issues will now be closed instead of leaving them open.

The enhancement backlog can be found here: https://github.com/11ty/eleventy/issues?utf8=%E2%9C%93&q=label%3Aneeds-votes+sort%3Areactions-%2B1-desc+

Don’t forget to upvote the top comment with 👍!

@zellwk

This comment has been minimized.

Copy link

zellwk commented Dec 9, 2018

I remember I had an error where I could only get page date with ``page.data.date`. Can't remember how to reproduce this error, but I thought you should know. Didn't file an issue then. Will update again if I encounter the error.

Otherwise, everything else looks good! :D

@edwardhorsford

This comment has been minimized.

Copy link

edwardhorsford commented Dec 9, 2018

Per #280, I'd really like if paginated pages exposed the key of the thing currently being iterated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment