Data structure
Data model
A single table, freshapphtmleverywhere, with a unique key (hook_name, id_shop) that limits it to one block per hook and per shop.
| Column | Role |
|---|---|
id_block | Auto-incremented id. |
hook_name | Name of the targeted display hook (e.g. displayHome). |
id_shop | The shop it belongs to. |
html_content | The block's HTML content, required. |
css_content | Optional CSS, written to a static file. |
js_content | Optional JS, written to a static file. |
use_rte | Block edited in TinyMCE (1) or raw code (0). |
active | Block rendered (1) or skipped (0) on the storefront. |