Section Preparation

Prerequisites: Back-Office Configuration

Objective

Create the complete site tree structure in the back-office: root Node, FR/EN Nodes with their Heroes, container Nodes (Guide, About). This step structures the site and fills initial content.

Configure Root Node

Role: Site entry point, detects browser language and redirects to /fr or /en.

Access: Sidebar menu → Management → Sections

Info

The Root Node was automatically created when running the php yii bc:init command. It already exists in the tree, just needs configuration.

1. Edit Node

  1. In section list, click pencil to edit existing Root Node
  2. Modify fields:
  3. Save
  1. Active: Checked
  2. Type: Redirect Lang
  3. Language: French
  4. Name: Root (if not already set)

2. URL Configuration

After saving, click URL tab:

  1. Active: Checked
  2. Host:
  3. Path: Leave empty
  4. Save

Final public URL:

Info

This Node contains no blocks because Redirect Lang Type allows no BlocTypes. Its only role is to redirect. No need to configure Sitemap or SEO as this Node does immediate redirect.

Create Home FR/EN Nodes

Node Home FR

Role: French home page with Hero, Features, and CTA.

1. Node Creation

  1. Button Add section
  2. Fill fields:
  3. Save
  1. Active: Checked
  2. Type: Home
  3. Language: French
  4. Name: FR
  5. Path: Hazel Path automatically generated (non-editable)
  6. Move: Check
  7. Mode: Into
  8. Target: Select Root

2. URL Configuration

Info

In Blackcube, URL path is always complete and absolute for all elements (Nodes, Composites, Categories, Tags). Path is never automatically inherited from parent.

URL tab:

  1. Active: Checked
  2. Host:
  3. Path: fr
  4. Save

3. Sitemap Configuration

Sitemap tab:

  1. Active: Checked
  2. Frequency: daily
  3. Priority: 1.0
  4. Save

4. SEO Configuration

SEO tab:

  1. Active: Checked
  2. Title: Blackcube CMS
  3. Description: CMS for Yii2. Official French documentation.
  4. Save

Final public URL: /fr

Node Home EN

Role: English home page with Hero, Features, and CTA.

1. Node Creation

  1. Button Add section
  2. Fill fields:
  3. Save
  1. Active: Checked
  2. Type: Home
  3. Language: English
  4. Name: EN
  5. Path: Hazel Path automatically generated (non-editable)
  6. Move: Check
  7. Mode: Into
  8. Target: Select Root

2. URL Configuration

URL tab:

  1. Active: Checked
  2. Host:
  3. Path: en
  4. Save

3. Sitemap Configuration

Sitemap tab:

  1. Active: Checked
  2. Frequency: daily
  3. Priority: 1.0
  4. Save

4. SEO Configuration

SEO tab:

  1. Active: Checked
  2. Title: Blackcube CMS
  3. Description: CMS for Yii2. Official English documentation.
  4. Save

Final public URL: /en

Fill Home FR/EN Heroes

Add Hero FR

  1. Edit FR Node (click pencil in section list)
  2. At bottom of page, Contents section: Select 01. Hero (H1) in dropdown → Click + button
  3. Hero block displays with its fields. Fill:

lang: Leave empty (to fill after creating Hero EN)

title:

    Blackcube CMS
    

description:

    Flexible and performant CMS for Yii2. Build custom sites with modular architecture and powerful block system.
    

image: Upload PNG/JPG background image (optional)

ctaTitle:

    Documentation
    

ctaTarget: Select in dropdown → SectionsGuide FR

ctaSecondaryTitle:

    Github
    

ctaSecondaryTarget: Enter route:

    redirect/github
    

  1. Save Node

Add Hero EN

  1. Edit EN Node
  2. At bottom of page, Contents section: Select 01. Hero (H1) in dropdown → Click + button
  3. Hero block displays with its fields. Fill:

lang: Leave empty (to fill after)

title:

    Blackcube CMS
    

description:

    Flexible and performant CMS for Yii2. Build custom websites with a modular architecture and powerful block system.
    

image: Upload same image as FR (or EN variant)

ctaTitle:

    Documentation
    

ctaTarget: Select in dropdown → SectionsGuide EN

ctaSecondaryTitle:

    Github
    

ctaSecondaryTarget: Enter route:

    redirect/github
    

  1. Save Node

Link FR/EN Content

Objective: Enable language switcher to work by linking FR and EN Heroes via lang field.

Link Hero FR → Hero EN

  1. Edit FR Node
  2. In existing Hero (H1) block, modify lang field: Select in dropdown → SectionsEN
  3. Save Node

Link Hero EN → Hero FR

  1. Edit EN Node
  2. In existing Hero (H1) block, modify lang field: Select in dropdown → SectionsFR
  3. Save Node

Info

The lang field allows HrefLangBehavior to automatically generate SEO tags and makes the language switcher work.

Create Container Nodes

Node Guide FR

Role: Container for French documentation articles. Redirects to first active article.

1. Node Creation

  1. Button Add section
  2. Fill fields:
  3. Save
  1. Active: Checked
  2. Type: Redirect First Composite
  3. Language: French
  4. Name: Guide
  5. Path: Hazel Path automatically generated (non-editable)
  6. Move: Check
  7. Mode: Into
  8. Target: Select FR

2. URL Configuration

URL tab:

  1. Active: Checked
  2. Host:
  3. Path: fr/guide
  4. Save

Final public URL: /fr/guide → will redirect to /fr/guide/first-article

Info

This Node redirects to first active article. No need to configure Sitemap or SEO as this Node never displays content.

Node Guide EN

1. Node Creation

  1. Button Add section
  2. Fill fields:
  3. Save
  1. Active: Checked
  2. Type: Redirect First Composite
  3. Language: English
  4. Name: Guide
  5. Path: Hazel Path automatically generated (non-editable)
  6. Move: Check
  7. Mode: Into
  8. Target: Select EN

2. URL Configuration

URL tab:

  1. Active: Checked
  2. Host:
  3. Path: en/guide
  4. Save

Final public URL: /en/guide → will redirect to /en/guide/first-article

Info

This Node redirects to first active article. No need to configure Sitemap or SEO as this Node never displays content.

Node About FR

Role: Container for "About" pages. Redirects to first active article.

1. Node Creation

  1. Button Add section
  2. Fill fields:
  3. Save
  1. Active: Checked
  2. Type: Redirect First Composite
  3. Language: French
  4. Name: About
  5. Path: Hazel Path automatically generated (non-editable)
  6. Move: Check
  7. Mode: Into
  8. Target: Select FR

2. URL Configuration

URL tab:

  1. Active: Checked
  2. Host:
  3. Path: fr/a-propos
  4. Save

Final public URL: /fr/a-propos → will redirect to /fr/a-propos/why-blackcube

Info

This Node redirects to first active article. No need to configure Sitemap or SEO as this Node never displays content.

Node About EN

1. Node Creation

  1. Button Add section
  2. Fill fields:
  3. Save
  1. Active: Checked
  2. Type: Redirect First Composite
  3. Language: English
  4. Name: About
  5. Path: Hazel Path automatically generated (non-editable)
  6. Move: Check
  7. Mode: Into
  8. Target: Select EN

2. URL Configuration

URL tab:

  1. Active: Checked
  2. Host:
  3. Path: en/about
  4. Save

Final public URL: /en/about → will redirect to /en/about/why-blackcube

Info

This Node redirects to first active article. No need to configure Sitemap or SEO as this Node never displays content.

Validation

Check complete tree in Management → Sections.

Expected structure:

    Root (/)
├── FR (/fr)
│   ├── Guide (/fr/guide)
│   └── About (/fr/a-propos)
└── EN (/en)
    ├── Guide (/en/guide)
    └── About (/en/about)
    

Verifications:

  1. 7 Nodes created: 1 root + 2 home + 4 containers
  2. 2 Heroes filled (FR + EN) with all required fields
  3. FR ↔ EN linking working via lang field
  4. URLs configured for all Nodes
  5. Sitemap enabled only for FR and EN (not for redirects)
  6. SEO configured only for FR and EN (not for redirects)

Front-end test:

Access site in preview mode (eye icon in back-office header):

  1. Access → should redirect to /fr or /en based on browser language
  2. Access /fr → should display French home page
  3. Access /en → should display English home page
  4. Language switcher works (FR ↔ EN)
  5. Access /fr/guide or /fr/a-propos → 404 error (normal, no articles created yet in these sections)