How do I render a specific item from a collection? #810
-
I want to add quotes grouped per author, so I make a collection:
My idea was that I would have a
Is there a way to do something like |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@firedev It sounds like you might want to look into resource relations: https://www.bridgetownrb.com/docs/resources#resource-relations That way your quotes can be related to specific authors in the authors collection, and you can lookup all quotes by certain authors, etc. |
Beta Was this translation helpful? Give feedback.
-
I came back to quotes, trying to render a specific one. Is there a way to access it by slug, not just by number?
|
Beta Was this translation helpful? Give feedback.
-
Here is what I did
|
Beta Was this translation helpful? Give feedback.
@firedev It sounds like you might want to look into resource relations:
https://www.bridgetownrb.com/docs/resources#resource-relations
That way your quotes can be related to specific authors in the authors collection, and you can lookup all quotes by certain authors, etc.