Files
| Path | Contents |
|---|---|
config/theme.ini |
Settings, page and block templates, resource page blocks |
config/design.php |
Style presets, bundled fonts and stylesheets |
helper/ThemeEngine.php |
The theme's view helper, $this->ThemeEngine() (also available as $this->Vitrine()) |
asset/css/vitrine.css |
Vitrine's own styles, in the theme cascade layer |
engine/src/ |
The Theme Engine, shared by RefBytes themes: color math, design tokens, fonts, presets, dates, the view helper |
view/ |
Templates (the engine's) |
asset/engine/css/engine.css |
Base styles in cascade layers |
asset/engine/css/integrations.css |
Module styles, loaded after module stylesheets |
asset/engine/js/engine.js |
Menus, drawer, display switch, layout switch, image viewer, copy and share |
language/ |
Translations; template.pot lists every string |
Settings resolution
$this->ThemeEngine()->get('key') returns a setting's value: the saved value, else the preset's value for presetable settings, else the theme.ini default. Omeka's own themeSetting() does not apply presets or defaults, so use the helper.
Useful helper methods
| Method | Use |
|---|---|
dateText($value), dateHtml($value) |
Machine dates as "July 7, 2025" in the site's language and time zone; dateHtml() wraps them in <time datetime> |
icon($name) |
The theme's inline SVG icons |
asset($key) |
The asset chosen in an asset setting |
region($resource, $region) |
One resource page region's blocks |
setPageResource($resource) |
Registers what a template shows, for its description, sharing image and canonical address |
Live preview hooks
The Design Studio module previews unpublished settings through these:
- The saved settings pass through the
theme_engine.settingsview event, then Vitrine 0.5'svitrine.settings(filter thesettingsparameter), before they are resolved. withSaved($settings)returns a copy of the helper reading other settings.livePreview()returns what restyles an open page: the token and custom CSS, body classes,<html>attributes, and header and footer data attributes.renderKey()changes only when a setting outsideliveSettings()changes, that is, when the page must be rendered again.
Changing the theme
To change how pages look, use the Custom CSS setting (theme settings, Advanced) with the design tokens: it is kept when the theme is updated. Files you change in the theme folder, such as a template under view/, are replaced by the next update.