Conn2Flow
Docs navigation

Reference / Modules

Admin components module

Editing reusable HTML/CSS components.

Path in the Gestor modulos/admin-componentes/

Edits reusable HTML/CSS fragments by language and optionally module. The core inserts them with gestor_componente() and adds their resources to the page.

How to use

Open admin-componentes/, create at admin-componentes/adicionar/, or edit at admin-componentes/editar/?id=<slug>. Enter a name, CSS framework, and module where relevant; write HTML, CSS, and extra <head> HTML in the editor. The code editor comes from html-editor; this module's JS does not implement a separate editor. Routes are the same in pt-br and en.

Technical reference

The controller handles listar, adicionar, and editar; status and deletion use the shared interface. The AJAX switch has no active case. Saved HTML/CSS use internal global-variable markers; the controller converts the editor's textual form to storage form and reverses it when loading. Editing backs up changed content, records history, increments version, and marks user_modified=1. It stores css_source_hash calculated from HTML/CSS to track CSS provenance. The module declares no widget, template, hooks, or hooks.api.

componentes has numeric id_componentes, id, nome, language, modulo, MEDIUMTEXT html/css, status, versao, timestamps, user_modified, file_version, and checksum; migrations add framework_css, css_compiled, css_precompiled, html_extra_head, project, and provenance hash. (id, language) is unique. gestor_componente(['id'=>'...']) queries by id and language, accepts an optional module filter, and returns HTML; return_css returns HTML and resources separately. The normal path adds CSS, precompiled and compiled CSS, and head HTML to the page. In development mode, the helper can also read physical module/root resources when the record points to them.

Confirmed limitations

See also

The Future is Hybrid: Human + AI.

Conn2Flow is the tool. If you need the Architect to design your company's strategy using this technology...

Hire Specialized Consulting