Reference Omeka Classic theme

For Developers

Files

Path Contents
theme.ini Omeka's theme information, and the Theme Engine version the theme was built with (engine_version)
config.ini The Configure Theme form: Vitrine's own settings (style preset, fonts), the engine settings it shows, and the form's sections
config/design.php Style presets, bundled fonts and the stylesheet
custom.php Boots the engine; templates reach it as $this->themeEngine()
asset/css/vitrine.css Vitrine's own touches, in the theme cascade layer
asset/fonts/ Self-hosted variable WOFF2 fonts, one folder per family with its OFL.txt
common/, items/, collections/, exhibit-builder/, simple-pages/… Templates, at the paths Omeka looks for them: the engine's (see below)
engine/ The Theme Engine for Omeka Classic, shared by RefBytes themes: settings logic, color math, design tokens, fonts, templates, base styles and scripts. engine/README.md documents it.
asset/engine/css/engine.css, classic.css Base styles in cascade layers
asset/engine/css/integrations.css Plugin styles, loaded after plugin stylesheets
asset/engine/js/engine.js Menus, drawer, light/dark switch, grid/list switch, image viewer, copy and share

Settings resolution

$this->themeEngine()->get('key') returns a setting's value: the saved value, else the preset's value for presetable settings, else the config.ini default. Omeka's own get_theme_option() returns only the saved value, without presets or defaults, so use the helper. The saved values come from Theme::getOptions(), so an exhibit with its own Vitrine settings gets them, and pass through the theme_engine_settings filter, which the Design Studio plugin uses for its preview.

Useful helper methods

Method Use
get($key), settings() One setting, or all of them, resolved
phrase($text) An engine phrase in the theme's words, translated
dateText($value), dateHtml($value) Machine dates as "July 7, 2025" in the site's language; dateHtml() wraps them in <time datetime>
icon($name) The theme's inline SVG icons
uploadUrl($key) The address of a file uploaded in a file setting
displayTitle($record), recordText($record, $element) A record's title, or an element's first value, as plain text
setPageRecord($record) Registers what a template shows, for its description, sharing image and canonical address

Changing a template

Every template is a link to the engine's file. To change one, replace the link with a real file at the same path (copy the engine's file first), and keep it when you upgrade. Hooks that plugins use on public pages (public_head, public_body, public_header, public_content_top, public_footer, public_home, public_items_show, public_items_browse, public_items_browse_each, public_collections_show, public_collections_browse, public_collections_browse_each) are fired where Omeka's default theme fires them: keep them in your copy.

Changing the look

To change how pages look, use the Custom CSS setting (Advanced) with the design tokens: it is kept when the theme is upgraded. See Custom CSS and design tokens. Files you change in the theme folder are replaced by the next upgrade, unless you work on your own edition of the theme (see Installation).

Building

In the RefBytes repository, engine is a link to the shared theme-engine/ folder, the templates are links into it, and release.sh zips real files. From the Omeka folder:

php theme-engine/tools/link-theme.php themes/vitrine          # after adding a template to the engine
php theme-engine/tools/build-theme-config.php themes/vitrine  # after changing the settings list in config.ini
php theme-engine/tests/contrast.php themes/vitrine            # every preset's contrast, in both schemes
./release.sh vitrine --zip
Log in for Support