Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork555
Simplify retrieval of collections.all ingetLocaleCollectionItem#3785
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
noelforte commentedMay 30, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Sorry to bug you Zach, any inclination on when this might get reviewed? Is there something that I could do to help push things along? |
…gines missing `ctx` variables)
noelforte commentedAug 10, 2025
@zachleat Just confirming, is this PR on hold for a specific reason? It's not been tagged as |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This change motivated by:noelforte/eleventy-plugin-vento#221
I couldn't figure out why the i18n plugin's presence was breaking the
getNextCollectionItemandgetPreviousCollectionItemfilters since the Vento template engine plugin doesn't do anything fancy with the filters.After a lot of trial and error, I discovered that this search for collections.all at the very end of the
GetLocaleCollectionItemmodule checks a lot of things specific to Eleventy's own internal engines but of course custom engines don't add actxorcontextobject, or eventhis.collections, sincethis.pageandthis.eleventyare the only context keys Eleventy supports, andcollectionsis already accessible in page data anyway.Rather than add
this.collectionsto the Vento custom engine, could we simplify thealldeclaration to search thedatakey instead since thedatakey is already available on the render context anyway?If not, I can look into adding
this.collectionsto the custom engine for my plugin, but if this can be handled upstream that puts less pressure on custom engines to support adding it.Thanks Zach!