Skip to content

Content Modeling Guide

Sveltia CMS is a generic-purpose content management system that can be adapted to various use cases. How to structure your collections and design your content models depends on your project requirements. Here are some guidelines and examples to help you get started.

Planning Your Content Model

Content modeling is primarily a non-technical task that requires understanding of your content and how it will be used. It’s recommended to involve content editors and stakeholders in the planning process to ensure the content model meets everyone’s needs. If you are building a site for a client, collaborate with them to understand their content requirements and workflows.

Understanding Content Models

A content model defines the structure and organization of your content within Sveltia CMS. It consists of collections, which are groups of related content items, and fields, which define the properties of each content item.

When designing your content model, consider the following:

  • Content types: Identify the different types of content you need to manage (e.g., blog posts, products, pages).
  • Collections: Decide whether to use entry collections (for multiple similar items) or file collections (for individual files) based on your content types.
  • Fields: Define the fields required for each content type, including their data types and validation rules.
  • Relationships: Determine if there are any relationships between different content types that need to be represented (e.g., authors for blog posts, categories for products).

Tips for Designing Content Models

Some best practices for designing effective content models in Sveltia CMS include:

  • Plan ahead: Take the time to think through your content structure before creating collections and fields. This will help avoid unnecessary changes later.
  • Keep it simple: Start with a basic structure and expand as needed. Avoid overcomplicating your content model.
  • Use meaningful names: Choose clear and descriptive names for collections and fields to make it easier to understand.
  • Leverage field types: Utilize the various field types available in Sveltia CMS to capture different kinds of data effectively.
  • Plan for scalability: Consider how your content model may need to evolve over time and design it to accommodate future changes.
  • Test and iterate: Regularly review and refine your content model based on feedback from content editors and users.

Using Relations Between Collections

Sveltia CMS supports Relation fields that allow you to create relationships between different collections. This is useful for linking related content items, such as associating blog posts with authors or products with categories.

When using relations, consider the following:

  • Cardinality: Decide whether the relationship is one-to-one, one-to-many, or many-to-many, and configure the Relation field accordingly.
  • Performance: Be mindful of the potential performance implications of complex relationships, especially with large datasets.
  • User experience: Ensure that the relationship is intuitive for content editors, providing clear labels and options in the CMS interface.

Examples of Content Models

Here are some common content models for different types of websites and applications, along with suggestions on how to structure your collections and fields.

Blog or News Site

  • Posts: entry collection for blog posts or news articles, with fields: title (String, required), body (RichText, required), author (Relation), date (DateTime, required), tags (Relation), status (Select: draft/published/archived), featured_image (Image), and excerpt (Text). Organized by date with draft/published workflow.
  • Tags: entry collection for managing available tags, linked to posts via a Relation field. For more details, see our how-to on this topic.
  • Authors: entry collection for managing the list of authors, with fields: name (String, required), bio (RichText), photo (Image), and email (String), linked to posts via a Relation field.
  • Pages: file collection for static pages like About or Contact.

Documentation Site

  • Documents: entry collection for documentation pages, with fields: title (String, required), body (RichText, required), version (Relation), sidebar_position (Number), published (Boolean), and search_keywords (String, optional), linked to versions via a Relation field.
  • Versions: entry collection for managing available versions (e.g., v1.0, v2.0), linked to documentation pages via a Relation field.
  • Categories: entry collection for organizing documentation by category, with fields: name (String, required), slug (String, required), and order (Number), linked to documents via a Relation field.
  • Tutorials: entry collection for step-by-step tutorials and guides, with fields: title (String, required), content (RichText, required), difficulty (Select: beginner/intermediate/advanced), estimated_time (Number), and published (Boolean), linked to the Tutorials page via a Relation field.
  • Pages: file collection for static pages like Getting Started or FAQ.

Portfolio Site

  • Portfolio items: entry collection for portfolio items, with fields: title (String, required), description (RichText), images (List of Images), project_url (String), categories (Relation), skills (Relation), year (Number), and status (Select: in_progress/completed/archived), linked to categories and skills via Relation fields.
  • Categories: entry collection for managing available categories (e.g., Web Design, Branding, Photography), linked to portfolio items via a Relation field.
  • Skills: entry collection for managing the list of skills or technologies used (e.g., React, Figma, CSS), linked to portfolio items via a Relation field.
  • Testimonials: entry collection for client testimonials, with fields: client_name (String, required), testimonial_text (Text, required), company (String), photo (Image), and rating (Select: 1-5 stars), linked to portfolio items via a Relation field.
  • Pages: file collection for static pages like About Me or Services.

Corporate Website

  • Pages: file collection for static pages like Home, About Us, Services, and Contact.
  • Services: entry collection for services offered, with fields: name (String, required), description (RichText, required), icon (Image), price (String), and featured (Boolean).
  • Products: entry collection for products or offerings, with fields: name (String, required), brand (Relation), description (RichText), price (Number), image (Image), sku (String, required), and in_stock (Boolean).
  • Brands: entry collection for brand information, with fields: name (String, required), logo (Image), description (RichText), website (String), and featured (Boolean).
  • Clients: entry collection for client logos or profiles, with fields: name (String, required), logo (Image), website (String), and contact_person (String), linked to testimonials and case studies via Relation fields.
  • Testimonials: entry collection for client testimonials, with fields: client (Relation, required), testimonial_text (Text, required), contact_person (String, required), photo (Image), and rating (Select: 1-5 stars), linked to clients via a Relation field.
  • Case studies: entry collection for case studies, with fields: title (String, required), description (RichText), client (Relation, required), images (List of Images), results (RichText), and featured (Boolean), linked to clients via a Relation field.
  • Leadership: entry collection for team members, with fields: name (String, required), role (String, required), bio (RichText), photo (Image), email (String), and social_links (KeyValue).
  • Locations: entry collection for office locations, with fields: name (String, required), address (String), city (String), country (String), phone (String), email (String), and map_url (String).
  • Careers: entry collection for job openings, with fields: job_title (String, required), description (RichText), location (Relation), employment_type (Select: full-time/part-time/contract), and application_url (String).
  • News: entry collection for news or press releases, with fields: title (String, required), content (RichText), date (DateTime), and published (Boolean).

Personal Blog with Static Pages

  • Posts: entry collection for blog posts, with fields: title (String, required), body (RichText, required), date (DateTime, required), tags (Relation), excerpt (Text), featured_image (Image), published (Boolean), and reading_time (Number, auto-calculated), linked to tags via a Relation field.
  • Tags: entry collection for managing available tags, linked to posts via a Relation field. For more details, see our how-to on this topic.
  • Projects: entry collection for personal projects or side projects, with fields: title (String, required), description (RichText), images (List of Images), url (String), technology (String), and featured (Boolean).
  • Pages: file collection for static pages like About Me and Contact.

Event Management Site

  • Events: entry collection for events, with fields: name (String, required), date (DateTime, required), location (Relation), description (RichText), registration_url (String), capacity (Number), status (Select: upcoming/ongoing/completed/cancelled), and featured (Boolean), linked to categories, locations, and sessions via Relation fields.
  • Categories: entry collection for event categories (e.g., Conference, Webinar, Workshop), linked to events via a Relation field.
  • Locations: entry collection for available venues, with fields: name (String, required), address (String), city (String), capacity (Number), and map_url (String), linked to events via a Relation field.
  • Organizers: entry collection for event organizers, with fields: name (String, required), role (String), bio (RichText), and photo (Image).
  • Speakers: entry collection for event speakers, with fields: name (String, required), bio (RichText), photo (Image), and website (String).
  • Sessions: entry collection for event sessions, with fields: title (String, required), speaker (Relation), time (DateTime), duration (Number), room (String), and description (RichText).
  • Sponsors: entry collection for event sponsors, with fields: name (String, required), logo (Image), website (String), sponsorship_level (Select: bronze/silver/gold/platinum), and featured (Boolean), linked to events via a Relation field.
  • Pages: file collection for static pages like Event Guidelines or FAQ.

Music Band Website

  • Albums: entry collection for albums, with fields: title (String, required), release_date (DateTime), tracklist (Relation), cover_image (Image), description (RichText), genre (Select), and streaming_links (KeyValue), linked to tracks via a Relation field.
  • Tracks: entry collection for tracks within each album, with fields: title (String, required), duration (Number), audio_url (String), lyrics (RichText, optional), and featured_artist (String), linked to albums via a Relation field.
  • Members: entry collection for band members, with fields: name (String, required), role (String, required), bio (RichText), photo (Image), and social_links (KeyValue).
  • Tour dates: entry collection for tour dates, with fields: event_name (String, required), date (DateTime, required), location (Relation), ticket_url (String), and sold_out (Boolean), linked to locations via a Relation field.
  • Locations: entry collection for available venues, with fields: name (String, required), city (String), country (String), and capacity (Number), linked to tour dates via a Relation field.
  • Media: entry collection for band media including photos and concert videos, with fields: title (String, required), type (Select: photo/video), files (List of Images or File), date (DateTime), event (String, optional), and featured (Boolean), organized by date with featured media highlighted on the gallery page.
  • Pages: file collection for static pages like About the Band or Contact.

Recipe Website

  • Recipes: entry collection for recipes, with fields: title (String, required), description (RichText), categories (Relation), ingredients (Relation), instructions (RichText, required), cooking_time (Number), prep_time (Number), servings (Number), difficulty (Select: easy/medium/hard), and images (List of Images), linked to categories, ingredients, and chefs via Relation fields.
  • Categories: entry collection for recipe categories (e.g., Appetizers, Desserts, Main Courses), linked to recipes via a Relation field.
  • Ingredients: entry collection for available ingredients, with fields: name (String, required), description (RichText, optional), image (Image), and unit (String), linked to recipes via a Relation field.
  • Chefs: entry collection for chefs, with fields: name (String, required), bio (RichText), specialties (String), photo (Image), and website (String), linked to recipes via a Relation field.
  • Cooking tips: entry collection for cooking tips, with fields: title (String, required), content (RichText, required), category (Select), and images (List of Images).
  • Pages: file collection for static pages like Cooking Tips or About the Chef.

Educational Platform

  • Courses: entry collection for courses, with fields: title (String, required), description (RichText, required), instructor (Relation, required), categories (Relation), location (Relation, optional), enrollment_link (String), level (Select: beginner/intermediate/advanced), price (Number, optional), status (Select: draft/published/archived), linked to instructors, categories, lessons, and locations via Relation fields.
  • Instructors: entry collection for instructors, with fields: name (String, required), bio (RichText), photo (Image), email (String), contact_info (KeyValue), and expertise (String), linked to courses and blog posts via Relation fields.
  • Lessons: entry collection for lessons within each course, with fields: title (String, required), course (Relation, required), content (RichText), resources (List of Strings), order (Number), and video_url (String, optional), linked to courses via a Relation field.
  • Categories: entry collection for course categories (e.g., Web Development, Design, Business), linked to courses via a Relation field.
  • Locations: entry collection for available venues (for in-person courses), with fields: name (String), city (String), and address (String), linked to courses via a Relation field.
  • Testimonials: entry collection for student testimonials, with fields: student_name (String, required), course (Relation), testimonial_text (Text, required), rating (Select: 1-5), and photo (Image, optional).
  • Events: entry collection for upcoming educational events (workshops, webinars), with fields: title (String, required), date (DateTime, required), description (RichText), registration_url (String), and capacity (Number).
  • Blog posts: entry collection for educational articles and updates, with fields: title (String, required), body (RichText, required), author (Relation), date (DateTime, required), tags (Relation), published (Boolean), and featured_image (Image), linked to instructors (as authors) and tags via Relation fields.
  • Tags: entry collection for managing blog post tags, linked to blog posts via a Relation field.
  • Pages: file collection for static pages like About Us or Contact.

Non-Profit Organization Site

  • Pages: file collection for static pages like Mission, Programs, Leadership, Donate, and Contact.
  • News: entry collection for news related to the organization, with fields: title (String, required), content (RichText, required), date (DateTime, required), featured_image (Image), author (String), and published (Boolean).
  • Events: entry collection for upcoming events, with fields: name (String, required), date (DateTime, required), location (Relation), description (RichText), registration_url (String), and featured (Boolean).
  • Locations: entry collection for available venues, with fields: name (String, required), address (String), city (String), and capacity (Number), linked to events via a Relation field.
  • Board Members: entry collection for board members, with fields: name (String, required), role (String, required), bio (RichText), photo (Image), and email (String), linked to the Leadership page via a Relation field.
  • Programs: entry collection for programs offered by the organization, with fields: name (String, required), description (RichText, required), goals (List of Strings), images (List of Images), budget (Number, optional), and impact (RichText), linked to the Programs page via a Relation field.
  • Volunteer Opportunities: entry collection for volunteer roles, with fields: title (String, required), description (RichText), requirements (List of Strings), commitment (Select: flexible/regular/one-time), and application_url (String).
  • Success Stories: entry collection for success stories, with fields: title (String, required), content (RichText, required), featured_image (Image), author (String), date (DateTime), and impact_metric (String).
  • Partners: entry collection for partner organizations, with fields: name (String, required), description (RichText, optional), logo (Image), website (String), and partnership_type (String).
  • Sponsors: entry collection for sponsors, with fields: name (String, required), description (RichText, optional), logo (Image), website (String), and sponsorship_level (Select: bronze/silver/gold/platinum).
  • Campaigns: entry collection for fundraising campaigns, with fields: title (String, required), description (RichText, required), goal_amount (Number), raised_amount (Number, auto-updated), end_date (DateTime, required), images (List of Images), and status (Select: active/completed/paused).

Real-World Examples

To see how others have structured their content models using Sveltia CMS, check out our Showcase page. It features a variety of websites using Sveltia CMS. Most of them include a link to their source code, which can provide valuable insights into different content modeling approaches.

Released under the MIT License.