Skip to content
Docs

Developer guide

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 call Rhymix\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

PathContents
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's conf/module.xml run.

Action names follow a convention.

PrefixMeaningCall method
dispRenders a screenGET
procProcesses dataPOST (CSRF token checked automatically)
getApi, etc.Returns dataDepends 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 buildToolDocument
A new feature (including DB and admin screens)ModuleBuilding modules
The look of an existing moduleModule skinBuilding skins and layouts
The frame of the whole siteLayoutBuilding skins and layouts
A layout + skin setTheme packageBuilding a theme package
Lightweight behavior that hooks into every requestAdd-on(Planned)
A content piece you drop anywhere in a layoutWidget(Planned)