Collections and targeting single items in them #3080
DeaJae
started this conversation in
Uncategorized
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm not even sure if this is possible, nor how to explain it properly.
At the moment we use WordPress with ACF which allows us to select data and save those as IDs, which then get picked up by a function in the theme to display additional data from that ID via an API.
I've been trying Eleventy for a few months now as a much faster/less bloaty alternative to WP and figured that the frontmatter could hold these values, or the names of the values to translate to IDs, and possibly use the API to look against.
Documentation and searches suggest that I should use the API as a collection, but I can't work out how that would work as a shortcode in articles to pull single bits of data from the API.
for example {% typeDisplay itemName %}
I suspect that a highly customized Shortcode, Filter or Macro would be required in pages which aren't part of templates, but researching those loops me back to Collections again.
I'm trying some more ideas out so will add more here later if it needs to be clearer, or a lost cause.
Beta Was this translation helpful? Give feedback.
All reactions