Skip to content

Instantly share code, notes, and snippets.

@xdghcnt

xdghcnt/t2 Secret

Created July 15, 2014 11:43
Show Gist options
  • Save xdghcnt/1253e5f518215577fe22 to your computer and use it in GitHub Desktop.
Save xdghcnt/1253e5f518215577fe22 to your computer and use it in GitHub Desktop.
module.exports = function (bh) {
bh.match('test-block', function (ctx) {
ctx.content([
{elem: 'section1'},
{elem: 'section2'}
]);
});
bh.match('test-block__item', function (ctx) {
ctx.content(ctx.param('par'));
});
bh.match('test-block__section1', function (ctx) {
return [
{elem: 'item', par: 'a1'},
{elem: 'item', par: 'a2'},
{elem: 'item', par: 'a3'}
];
});
bh.match('test-block__section2', function (ctx) {
return [
{elem: 'item', par: 'b1'},
{elem: 'item', par: 'b2'},
{elem: 'item', par: 'b3'}
];
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment