patternlab-viewer.js:1 Uncaught TypeError: Cannot read property 'innerHTML' of null
which appears to be related to a #pl-pattern-data-footer
element
div
tags to mimic how Zoho Sites generates HTML. I have atoms for these sections, but the content of these sections differ in the molecules I'm creating.
So to say it in the most simple way: I want to find a way to pass the generated html of one atom as the content (parameter) of another (the outer) atom as the result of my molecule.
Coming back to my own question: using the Handlebars engine and Dynamic Partials (https://handlebarsjs.com/partials.html#dynamic-partials) solved it for me:
https://gitter.im/pattern-lab/node?at=5bfdc4b0a6e00567431e2d0d
Dynamic Partials
(https://handlebarsjs.com/partials.html#dynamic-partials). As an example, here is my box
molecule (https://gitlab.com/ringods/zoho-sites-template-development/blob/master/source/_patterns/02-molecules/05-containers/00-box.hbs), using a data lookup for the name of the partial to insert. The value in the data file points to the pattern to insert as the content
(https://gitlab.com/ringods/zoho-sites-template-development/blob/master/source/_patterns/02-molecules/05-containers/00-box.json).
button~primary.yml
but when I look at the button pattern page, only the main pattern is rendered and the primary pseudo one simple shows me the content of button~primary.yml
but in plain text and without any markup around them. I am using PL Node v3 beta 0.