You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📋 General description or bullet points (if proposing new content)
The current documentation show us how to generate the content when using the getEntry method for one entry only:
In my current use case, I have a collection of entries that I want to be rendered on one page. After fiddling for a few hours, here is a similar example to the one provided for one entry. but for multiple entries:
I'll make a StackBlitz example when I have the time but I wanted to share the solution first, so that anybody stuck on this problem can at least fix it if they find this issue.
🖥️ Reproduction of code samples in StackBlitz
No response
The text was updated successfully, but these errors were encountered:
MiloParigi
added
the
add new content
Document something that is not in docs. May require testing, confirmation, or affect other pages.
label
Mar 8, 2024
Yes, there are several ways to achieve this, including looking at the source in our own blog template or our instructions to convert to getCollections() instead of Astro.glob(). An example of accessing multiple entries and displaying them via a map is also shown here in the Accessing referenced data section of the page. I'm glad you figured something out that worked for you! 🙌
📚 Subject area/topic
Content collection - Rendering content to html
📋 Suggested page
https://docs.astro.build/en/guides/content-collections/#rendering-content-to-html
📋 General description or bullet points (if proposing new content)
The current documentation show us how to generate the content when using the
getEntry
method for one entry only:In my current use case, I have a collection of entries that I want to be rendered on one page. After fiddling for a few hours, here is a similar example to the one provided for one entry. but for multiple entries:
I'll make a StackBlitz example when I have the time but I wanted to share the solution first, so that anybody stuck on this problem can at least fix it if they find this issue.
🖥️ Reproduction of code samples in StackBlitz
No response
The text was updated successfully, but these errors were encountered: