Architecture overview
The minimum structure you need to know before building modules, skins, layouts, and themes on Zittme.
Relationship with Rhymix
Zittme is a GPL v2 engine forked from Rhymix 2.1.35. From a third-party development perspective, compatibility is what matters.
- The core namespace is
Zittme\.Rhymix\remains as a compatibility alias, so existing Rhymix modules that callRhymix\Framework\...keep working as is. - Write new code against
Zittme\. - Most modules, skins, and layouts built for Rhymix work without changes. Zittme-specific features (theme packages, repeat fields, the responsive flag) are designed so that installing them on Rhymix simply ignores them without errors.
Folder structure
| Path | Contents |
|---|---|
common/framework/ | Core framework classes (Zittme\Framework\...) |
classes/ | Legacy core classes (Context, ModuleHandler, etc.) |
modules/ | Modules. The basic unit of functionality |
layouts/, m.layouts/ | Layouts (PC / mobile only) |
themes/ | Theme packages |
addons/ | Add-ons (lightweight extensions that hook into request processing) |
widgets/ | Widgets |
files/ | Uploaded files, cache, settings. Site data, so not included in distributions |
Request flow
Every request enters through index.php, and two values decide which code runs.
- mid: the module instance name. Each "one board, one page" created in the sitemap is a mid. It becomes the first segment of the address (
/board,/manual). - act: the name of the action to run (
dispBoardContent,procBoardInsertDocument). Only actions declared in the module'sconf/module.xmlrun.
Action names follow a convention.
| Prefix | Meaning | Call method |
|---|---|---|
disp | Renders a screen | GET |
proc | Processes data | POST (CSRF token checked automatically) |
getApi, etc. | Returns data | Depends on use |
To make clean addresses such as mid/document_srl or mid/write, declare routes on actions. This is covered in Building modules.
Database
You don't write SQL directly. Queries are declared in XML files (queries/*.xml) and run with executeQuery('module_name.query_name', $args). If you also declare tables in XML (schemas/*.xml), the core creates them when the module is installed. For details, see Query XML.
Templates
Screens are drawn with template files (HTML). Two generations of syntax coexist.
- v2 (recommended):
@version(2)on the first line of the file.@if/@foreach/{{ }}style - v1 (legacy):
cond="",loop=""attribute style. For compatibility with existing resources
Build new resources with v2. See Template syntax v2.
Ways to extend, in summary
| What you want to build | Tool | Document |
|---|---|---|
| A new feature (including DB and admin screens) | Module | Building modules |
| The look of an existing module | Module skin | Building skins and layouts |
| The frame of the whole site | Layout | Building skins and layouts |
| A layout + skin set | Theme package | Building a theme package |
| Lightweight behavior that hooks into every request | Add-on | (Planned) |
| A content piece you drop anywhere in a layout | Widget | (Planned) |