I’m trying to implement a content adapter, using a local json file; each page generated from the content adapter will have between zero and five page resources. The information about the page resources is in the json, buried a few levels deep; each one has two lines in the json: a UID, which is the file name, and a “tag” which describes the image context.
I’ve been able to get the content adapter working, but I’m struggling with the page resources. I need to traverse the json to get the file name of each image, and won’t know ahead of time what that file name will be for a given page resource (since there may be several for a single page), and need to print the associated tag with the image. The Content adapters docs seems to assume I’ll know the file url/it will be consistent from page to page.
The repo is public: GitHub - Brown-University-Library/u2 at proto/ees · GitHub . The json is at /assets/data.json, the various images are also in assets; the content adapter is at /content/kiosk/_content.gotmpl; the page layout is at /themes/starter/layouts/kiosk/page.html.
As a side note, in this content adapter, is there a way to have the information from the json in a different variable from the page params? I’d like to be able to print all the json data in a loop, without the kind/draft/date info being included.