Skip to content

Commit 75a6507

Browse files
author
Nils Henning
committed
[TASK] extend basic building blocks guide
1 parent 2e1cdc6 commit 75a6507

File tree

1 file changed

+12
-10
lines changed
  • docs/guides/200-basic_building_blocks

1 file changed

+12
-10
lines changed

docs/guides/200-basic_building_blocks/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
# Basic Building Blocks
22

3-
## Table of contents
4-
5-
1. Concept
6-
1. Apps
7-
2. Pages
8-
3. Components
9-
2. Event System
10-
3. Core Features
3+
**Table of contents**
4+
1. [Concept](#concept)
5+
1. [Apps](#apps)
6+
2. [Pages](#pages)
7+
3. [Components](#components)
8+
1. [Core Components](#core-components)
9+
2. [Creating own components](#creating-own-components)
10+
3. [Creating own vue.js components](#creating-own-vuejs-components)
11+
2. [Event Hub](#event-hub)
12+
3. [Core Features](#core-features)
1113

1214
## Concept
1315

@@ -314,7 +316,7 @@ If you call a component and forget a required property matestack will throw a `M
314316

315317
Read more about how properties work and how it prevents overwriting other methods at the [component api](/docs/api/000-base/10-component.md#passing-options-to-components).
316318

317-
**Creating own vue.js components**
319+
#### Creating own vue.js components
318320

319321
For most cases you will not need to create custom vue.js components, but if you need custom javascript behavior you can implement it by using a custom vue.js component. It only differs slightly from components. They also need to implement a `response` method and use properties to access data but they inherit from `Matestack::Ui::VueJsComponent` and require a javascript file implementing the corresponding frontend component. In order to link these they require you to set a vue.js component name. Let's take a look at an example vue.js component:
320322

@@ -365,7 +367,7 @@ Implementing the javascript component works as you would normally implement your
365367
To use this component remember to add it like the product teaser to a registry. Also you need to add the javascript file to webpacker or the asset pipeline. To learn how to do that or if you want to know more about vue.js components take a look at the [vue.js component api](/docs/api/000-base/30-vue_js_component.md).
366368

367369

368-
## Event System
370+
## Event Hub
369371

370372
Matestack uses events as a communication layer to enable features of core vue.js components. It offers an event hub which is accessible to you. Reacting to events in javascript or triggering your own events is therefore possible.
371373

0 commit comments

Comments
 (0)