I want to pass hierarchical directory template data to javascript. I want to build an array from header data of child.md files from sub-directories. One row in the array for each sub-directory.
I’m able to create the variables and append data in the parent.html.twig file, but I cannot append the records using a child.md template.
Is there some way to arrange this so that I can append the data from child templates into a variable in the parent template?