I'm using assemble for prototyping a new site.
I would like to modularize my code quite drastically, much like Brad Frost is evangelizing with his pattern lab.
EXAMPLE
Basically I would like to have a title partial ("atom" in pattern-lab speak) which is used inside a hero partial ("molecule"):
title.hbs
<h1 class="{{class}}">{{text}}</h1>
hero.hbs
<section class="hero-unit">
{{!-- image and stuff --}}
<header class="hero-description">
{{> title }}
{{> subTitle }}
</header>
</section>
The hero partial is supposed to generic; I want to pass in data from JSON files per particular page. For my pages, I use a default layout that offers blocks. For example:
default.hbs
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
{{#block "hero"}}{{/block}}
{{#block "body"}}{{/block}}
</body>
</html>
myPageWithHero.hbs
{{#extend "default"}}
{{#content "hero"}}
{{ >hero }}
{{/content}}
{{#content "body"}}
{{!-- myPageContent --}}
{{/content}}
{{/extend}}
Now I'd like to set {{text}} inside the title partial which is inside the hero partial via the myPageWithHero.json file that I have. Is that at all possible? Or is my approach (which I have described in this very oversimplified example) completely deranged?
Cheers for any pointers! :-)