Simplify retrieval of collections.all in getLocaleCollectionItem#3785
Open
Simplify retrieval of collections.all in getLocaleCollectionItem#3785
getLocaleCollectionItem#3785Conversation
Contributor
Author
|
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)
faa4a92 to
0c16992
Compare
Contributor
Author
|
@zachleat Just confirming, is this PR on hold for a specific reason? It's not been tagged as |
noelforte
commented
Aug 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!