Ajusets desde codex
This commit is contained in:
@@ -39,7 +39,7 @@ Each module lives in `template/estandar/modulos/<moduleId>/` with:
|
||||
|
||||
1. **Read style reference** (steps above)
|
||||
2. **`acai-write`** — Create the module files directly (`index-base.tpl`, `style.css`, `script.js`, optional `hook.php`) using project-relative paths and complete file contents.
|
||||
3. **`compile_module`** — Compile after editing `index-base.tpl` so the CMS syncs the generated output.
|
||||
3. **Automatic compile** — Writing `index-base.tpl` automatically creates the generated template placeholders and triggers compilation. Only use `compile_module` manually if you need to re-run compilation without changing the file.
|
||||
4. **`add_module_to_record`** — Adds the module to a page. Response includes `sectionId` — use it directly in the next step.
|
||||
5. **`set_module_config_vars`** — Fill variables with content. Response includes `uploadFields` with `{ fieldName, recordNum }` for each upload variable.
|
||||
6. **Upload images** — Use `generate_image` then `upload_record_image` with the `recordNum` and `fieldName` from step 5's `uploadFields`. No need to read builder.json or call get_module_config_vars.
|
||||
@@ -73,6 +73,6 @@ Modules with `MJMLModule: true` in their schema are email modules:
|
||||
- Use `section_id` variable for unique anchors/scoping
|
||||
- Use `interno` variable to detect CMS editor vs public view
|
||||
- Include other modules with: `<module_id :param1="value1"></module_id>`
|
||||
- After editing `index-base.tpl`, ALWAYS call `compile_module`
|
||||
- Editing `index-base.tpl` with `acai-write` or `acai-line-replace` compiles automatically
|
||||
- Twig uses filters (with `|`), never functions
|
||||
- Twig concatenation uses `~`: `'value=' ~ variable`
|
||||
|
||||
Reference in New Issue
Block a user