Overview
The Content module is the heart of your website’s content management system. It allows you to create, organize, and publish content items with flexible layouts, featured images, and hierarchical categorization.Key Features
Flexible Layouts
Choose from multiple layout templates for content display
Image Management
Upload and store featured images in Supabase Storage
Hierarchical Categories
Organize content with parent-child category relationships
JSONB Content
Store rich content with flexible body and layout configuration
Content Structure
Each content item consists of:- Title (
titulo): Content headline - Description (
descripcion): JSONB object containing:body: Main content text/HTMLlayout: Layout template ID (1, 2, 3, etc.)
- Category (
categoria): Category ID for organization - Featured Image (
imagen_principal): Optional main image
Creating Content
Enter Content Details
Fill in the required fields:
- Title: Content headline
- Category: Select from hierarchical dropdown
- Body: Main content (supports HTML)
- Layout: Choose layout template (1-3)
- Featured Image: Optional image upload
Content Body and Layout
Content description is stored as JSONB:contenido.php
Layout Options
| Layout ID | Description |
|---|---|
1 | Standard single-column layout |
2 | Two-column layout with sidebar |
3 | Full-width hero layout |
Image Upload
Featured images are uploaded to Supabase Storage:contenido.php
Storage Path
Hierarchical Categories
Categories support parent-child relationships:contenido.php
Category Display
Categories are rendered in a hierarchical dropdown:Content Record Structure
Editing Content
Update Fields
Modify:
- Title
- Body text
- Layout selection
- Category assignment
- Featured image (optional replacement)
Deleting Content
To delete content:- Click the delete button
- Confirm the action
- Content record is permanently removed from the database
Category Management
Categories are managed in the same module:Creating Categories
- Name: Category display name
- Parent (
id_padre): Optional parent category for hierarchy - Slug: URL-friendly identifier
Nested Categories
You can create unlimited nesting levels:Database Tables
Content Table
Table Name:contenido
| Column | Type | Description |
|---|---|---|
id | integer | Primary key |
titulo | text | Content title |
descripcion | jsonb | Body and layout |
categoria | integer | Foreign key to categories |
imagen_principal | text | Storage path to image |
created_at | timestamptz | Creation timestamp |
Categories Table
Table Name:categoria-servicios
| Column | Type | Description |
|---|---|---|
id | integer | Primary key |
name | text | Category name |
id_padre | integer | Parent category ID (nullable) |
created_at | timestamptz | Creation timestamp |
API Endpoints
Content
- GET
/rest/v1/contenido- List content - POST
/rest/v1/contenido- Create content - PATCH
/rest/v1/contenido?id=eq.{id}- Update content - DELETE
/rest/v1/contenido?id=eq.{id}- Delete content
Categories
- GET
/rest/v1/categoria-servicios- List categories - POST
/rest/v1/categoria-servicios- Create category - PATCH
/rest/v1/categoria-servicios?id=eq.{id}- Update category - DELETE
/rest/v1/categoria-servicios?id=eq.{id}- Delete category
Best Practices
Troubleshooting
Category Validation Error
Problem: “Categoría inválida, selecciona desde la lista” Solution: Ensure you’re selecting a valid category ID from the dropdown, not typing a custom value.Image Upload Fails
Causes:- File size exceeds limits
- Invalid file extension
- Storage bucket permissions
upload_max_filesize and Supabase Storage bucket policies for the contenido bucket.
JSONB Parsing Errors
Problem: Content body not displaying correctly Solution: Verify that thedescripcion field contains valid JSON with body and layout keys.
Next Steps
Blog
Manage blog posts
Dashboard
View content statistics