Project Definition

Prerequisites: PHP, Yii2 MVC Framework is a plus

Objective

Build a professional documentation site for Blackcube CMS that demonstrates the CMS capabilities in a real-world situation.

This project serves two goals:

  1. Technical showcase: Concrete demonstration of Blackcube capabilities
  2. Real-world use case: Complete and functional implementation example

Info

This guide presents architecture and usage examples. Blackcube doesn't impose anything: adapt structures, widgets, and approaches to your project needs. Developers remain in full control of their code and choices.

Target Audience

  1. Evaluate Blackcube CMS for their projects
  2. Understand how to structure a Blackcube project
  3. See a concrete implementation example
Developers looking to:

Tech Stack

  1. Yii2 (PHP 8.3+)
  2. Blackcube (core + admin)
  3. MySQL 8.0 / MariaDB 10.11
Backend:

  1. Tailwind CSS v4
  2. Vanilla JS
  3. Heroicons (SVG)
Frontend:

Features Demonstrated

Content Structure

  1. 9 BlocTypes with JSON Schema
  2. 5 page Types
  3. Custom admin templates
BlocTypes and Types:

  1. Nodes (Sections)
  2. Composites (Articles)
  3. Parent/child relationships
Tree Structure:

Multilingual

  1. Parallel FR/EN structure
  2. Language switcher
  3. Automatic hreflang tags

SEO

  1. Complete per-element configuration
  2. XML sitemap
  3. Clean URLs

Navigation

  1. Hierarchical sidebar
  2. Automatic breadcrumb
  3. TOC extracted from headings
  4. Prev/next navigation

Administration

  1. Centralized parameters
  2. Configurable menus
  3. Custom input interface

Deliverables

Back-Office Configuration

  1. 9 configured BlocTypes
  2. 5 content Types
  3. Centralized parameters
  4. Menus (header/footer FR/EN)
  5. Complete tree structure

PHP Code

  1. Helpers (Parameters, CmsHelper)
  2. Controllers (Cms, Redirect)
  3. Behavior (HrefLang)
  4. Model (MailContact)
  5. Block and layout widgets
  6. Views
  7. Admin templates

Content

  1. Home pages (FR/EN)
  2. Contact pages (FR/EN)
  3. Documentation articles

Site Structure

Tree Structure

    / (Language Redirect)
├── /fr (Home FR)
│   ├── /fr/guide (Documentation FR)
│   │   └── /fr/guide/* (Articles)
│   ├── /fr/a-propos (About FR)
│   │   └── /fr/a-propos/* (Articles)
│   └── /fr/contact (Contact FR)
│
└── /en (Home EN)
    ├── /en/guide (Documentation EN)
    │   └── /en/guide/* (Articles)
    ├── /en/about (About EN)
    │   └── /en/about/* (Articles)
    └── /en/contact (Contact EN)
    

Page Types

  1. Type: Home
  2. Layout: Header + Hero + Features + CTA + Footer
Home page:

  1. Type: Documentation
  2. Layout: Header + Sidebar + Content + TOC + Footer
Documentation pages:

  1. Type: Contact
  2. Layout: Header + Hero + Form + Sidebar + Footer
Contact page:

Architectural Flexibility

  1. Reusable widgets
  2. Direct code in views
  3. Mixed approach
The widget/dispatcher approach presented is ONE example. Each project can have its own architecture:

Info

Blackcube doesn't enforce any particular structure.

Validation

  1. Project objective understood
  2. Tech stack validated
  3. Features to demonstrate identified
Before continuing: