Answer the question
In order to leave comments, you need to log in
BEM, how to make the correct connection of dependent blocks?
The index.bemjson.js bundle code looks like this:
module.exports = {
block: 'page',
title: 'Title of the page',
favicon: '/favicon.ico',
head: [
{ elem: 'meta', attrs: { name: 'description', content: '' } },
{ elem: 'meta', attrs: { name: 'viewport', content: 'width=device-width, initial-scale=1' } },
{ elem: 'css', url: 'index.min.css' }
],
scripts: [{ elem: 'js', url: 'index.min.js' }],
mods: { theme: 'islands' },
content: [
{
block: 'header',
}
]
};
({
shouldDeps: [
{
block: 'logo',
mods: {theme: 'sea'}
}
]
})
Answer the question
In order to leave comments, you need to log in
Helped on the bema forum itself:
If you want to make the logo automatically appear in the markup inside the header block, then you need to add the header.bemhtml.js template:
block('header').content()({ block: 'logo', mods: { theme: 'sea' } });
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question