Closed timwasson closed 6 years ago
@timwasson You can reference a JSON file from other JSON files. We often do this in the global navigation.json
to avoid repeating large chunks of data:
{
"primary": "@kalastatic/components/molecules/nav--primary/nav--primary.html.json",
"secondary": "@kalastatic/components/molecules/nav--secondary/nav--secondary.html.json",
"footer": "@kalastatic/components/molecules/nav--footer/nav--footer.html.json"
}
Any variable declared in this file should be available to reference from any file.
This is exactly what I needed. Closing this issue. Thank you for your time.
I have a component set up with several menu items currently in JSON format. This works fine on the component itself, but when I include the component as part of a prototype page, the JSON data is not included. I can bypass this using 'with', but the menu is quite long and I don't want to duplicate all the various links.
Is there a way around this problem?