-
Notifications
You must be signed in to change notification settings - Fork 4
How to create a page
jifeon edited this page Mar 18, 2015
·
3 revisions
There is an yeoman generator for that.
But under the hood:
- Create a page block directory. Block name must be prefixed with
page-:
$ mkdir desktop.blocks/page-hello-world- Create
page-hello-world.deps.jsfile.
$ touch desktop.blocks/page-hello-world/page-hello-world.deps.jsYou'll need to add a dependency from `i-page` at least.
({
mustDeps: ['i-page'],
shouldDeps: [{elem: 'title'}]
})- Create
page-hello-world.bemtreefile - data-template of your page.
block('page-hello-world').content()('Hello, world!');
block('page-hello-world').elem('title').content()('hello-world page');- Add your page's route to
desktop.bundles/index/index.routing.yml.
- id: page-hello-world
path: /hello-world- Add your page's block to
desktop.bundles/index/index.bemdecl.js.