The core idea of eWizard emails is to simplify and reuse as much as it possible. And with this idea in mind we have divided email elements into three logical essences: components, blocks, and modules. The component is the smallest building block of ET, it contains some basic HTML content like image, button or text. Block is a set of components intended for wrapping some logical part of ET: header, footer, main, e.t.c. Module is the biggest essence of the ET. It encapsulates several blocks and could be used as a template for further ETs.
Components
Components are simple elements with commonly used pieces of email's markup. For example, it can be a button, text, or a card with text.
They could be easily installed into ET by running the following command wiz install <component-name>
. See the list of the components available for installation.
After successfull installation you need to import and declare it in extensions\common.js
file in the following way substituting component-name with an actual name of the component:
import componentName from 'component-name'; //.. Vue.component('component-name', componentName);
Aa a final step, you need to add a component tag to a certain block and then add a block to the email App.vue
file. However, it is also possible to add component directly to the App.vue
file but it is not the best practice of components using.
Blocks
Blocks or fragments are ready-made sections of HTML page layout such as header, footer, etc. You can use blocks which are already installed into ET, just by copying block name from common/block
directory and pasting it as a tag inside email App.vue
file. Note, if you want to be able to add certain block from sidebar in eWizard you should also add them into common/blocks-library
and add information about them into blocks.json file.
Modules
Modules are used for wrapping content of the emails for further reusing in other emails. For example, if you want to reuse three of four blocks it is better to wrap them in the module and manage a single module instead of several blocks.