Skip to content

Schemas in Kantan CMS

What are Schemas?

Schemas in Kantan CMS define the structure and data types for your collections. They allow you to create custom fields tailored to your specific content needs, giving you complete control over how your data is organized and presented.

A schema consists of field definitions that determine:

  • What information can be stored in a record
  • What data types are used for each field
  • How the information is validated and processed
  • How the content is presented in the editing interface

With schemas, you can transform generic collections into specialized content structures perfectly suited to your website's requirements.

Managing Schemas

To access and manage schemas for a collection:

  1. Navigate to the specific collection
  2. Click on "Edit Schema" in the collection options
  3. You'll see the current schema structure for the collection

Adding a New Schema Field

To add a new field to your collection's schema:

  1. In the schema editor, click "Add Schema"
  2. Fill in the field details:
    • Name: Human-readable label for the field
    • Custom Key: Unique identifier used in the database and API (no spaces, lowercase)
    • Description: Optional explanation of the field's purpose
    • Field Type: Select from available data types (see below)
  3. Configure any type-specific options
  4. Save the new field

Editing an Existing Schema Field

To modify an existing schema field:

  1. In the schema editor, locate the field you want to edit
  2. Click the pen (edit) button next to the field
  3. Update the field properties as needed
  4. Save your changes

Schema Field Types

Kantan CMS offers a variety of field types to accommodate different content needs:

Text Field Types

  • Short Text: For titles, names, and brief text entries
  • Long Text: For paragraphs and extended content
  • Rich Text/Markdown: For formatted content with styling
  • HTML: For direct HTML content

Numeric Field Types

  • Number: For integer or decimal values
  • Currency: For monetary values with currency formatting

Selection Field Types

  • Dropdown: Single selection from predefined options
  • Multi-select: Multiple selections from predefined options
  • Tags: Flexible keyword or category assignments

Media Field Types

  • Image: For image file uploads with preview
  • File: For document or other file uploads
  • Media Reference: For linking to existing media in your library

Best Practices for Schema Design

When designing schemas for your collections, consider these recommendations:

  1. Plan your structure: Before creating fields, map out what information you need to store and how it will be used
  2. Use descriptive names: Choose clear, meaningful names for your fields
  3. Be consistent: Maintain naming conventions across collections
  4. Start simple: Begin with essential fields and add more as needed

Well-designed schemas form the foundation of an effective content management system, enabling efficient content creation and powerful content delivery.

TechMO LLC.