diff --git a/CLAUDE.md b/CLAUDE.md index 0bc5830..e93b751 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -80,10 +80,12 @@ There are two valid hook locations: How to reference them: - Global hook `hooks/hooks.calcular_precio.php` -> endpoint `/hooks/calcular_precio/` - Module hook `template/estandar/modulos/hero_banner/hook.php` -> endpoint `/hooks/hero_banner/` +- Module hook `template/estandar/modulos/buscadorapartados_hjd8s/hook.php` -> endpoint `/hooks/buscadorapartados_hjd8s/` Rule of thumb: - If the logic is only used by one module, prefer that module's `hook.php` - If the logic will be reused by several modules/pages, create a global hook in `hooks/` +- Return arrays from hooks; do not use `echo json_encode(...)` or `exit` See [docs/hooks-and-api.md](docs/hooks-and-api.md) for usage. diff --git a/docs/css-js-conventions.md b/docs/css-js-conventions.md index 8460082..ee45004 100644 --- a/docs/css-js-conventions.md +++ b/docs/css-js-conventions.md @@ -72,6 +72,10 @@ Patrón para colores configurables por el usuario: JavaScript scopeado al módulo usando `section_id`: +This is the default and expected place for module JavaScript. +Do NOT embed `