Humblee

A humble PHP framework & CMS

Creating Pages

In Humblee, a "page" is the combination of three things: a view file that defines the HTML structure, a template record in the CMS that connects a URL to that view and declares which content blocks are editable, and the content that editors fill in through the admin interface. You define the structure in code; the CMS handles the content.

The full workflow looks like this:

  1. Define a block type in the CMS — this is a named, typed content slot (plain text, rich text, Markdown, etc.)
  2. Create a view file in application/views/ that calls Draw::content() for each block you want to display
  3. Create a template record in Admin > Templates that links the view file to one or more block types
  4. Create a page record in Admin > Pages that assigns a URL slug to a template
  5. Edit the content through the admin interface or inline editing toolbar

Each step is covered in its own guide:

  • Block types — what blocks are and how to define them in the CMS
  • Templates — how to create a view file and register it as a template
  • Block slots — how to add blocks to a template, including multiple instances of the same block type
  • Linking pages — creating a page record, assigning a template, and editing content