# Quick Reference ## Reglas Críticas | Regla | Correcto | Incorrecto | |-------|----------|------------| | Nombres de tabla | `'productos'` | `'cms_productos'` | | Primary key | `record.num` | `record.id` | | Foreign keys | `categoria_num` | `categoria_id` | | Upload fields | `record.imagen[0].urlPath` | `record.imagen` | | Optimizar imagen | `record.imagen[0].urlPath \| imagec(800)` | `record.imagen.url` | | Filtros Twig | `{{ 'table' \| get() }}` | `{{ get('table') }}` | | Campo enlace | `{{ producto.enlace }}` (ya tiene barras) | `"/{{ producto.enlace }}/"` | | Nombres builder vars | `data-field-label` → sin espacios/especiales, minúsculas | Mantener casing original | | Checkbox | `1` o `0` (número) | `true`/`false` | | Formato fecha | `YYYY-MM-DD HH:mm:ss` | Cualquier otro formato | | c-if igualdad | `c-if="x = 'valor'"` (un `=`) | `c-if="x == 'valor'"` | | Twig if igualdad | `{% if x == 'valor' %}` (doble `==`) | `{% if x = 'valor' %}` | | queryDB tablas | `SELECT * FROM cms_tabla` (con prefijo) | `SELECT * FROM tabla` | | get tablas | `'tabla' \| get()` (sin prefijo) | `'cms_tabla' \| get()` | ## Builder Variable Types | Type | Elemento | Retorna | |------|----------|---------| | `textfield` | `
` | String | | `headfield` | `