Melis EngineFoundation · data & cache

The engine room of every Melis site

Invisible to end-users, Melis Engine owns all the website data — pages, sites, templates, languages, SEO — and the services, cache and plugin framework the whole platform runs on.

Live demo
engine — page services
// Read a page through the engine — never the tables directly:
$page = $sm->get('MelisEnginePage');
$published = $page->getDatasPage($idPage);            // live
$draft     = $page->getDatasPage($idPage, 'saved');   // working draft

// The tree: children, breadcrumb, canonical links — all cached:
$tree = $sm->get('MelisEngineTree');
$url  = $tree->getPageLink($idPage, true);            // absolute URL
Single source of truthPages, sites, SEO
CachedFast pages

Package

melis-engine

Role

Foundation

UI

None — headless

Owns tables

Yes

Cache

laminas-cache

License

OSL-3.0

Overview

The data foundation

Think of a Melis site as three layers: Melis CMS is the steering wheel (the back-office), Melis Front is the bodywork and wheels (what visitors see), and Melis Engine is the engine and fuel tank — it holds all the data and the machinery both rely on. You never click ‘Engine’, but it works under every page.

It keeps the published and saved (draft) versions of each page separate, models pages per language and per site, and caches rendered pages so they load fast — publishing clears the relevant cache so edits go live.

Key features

Everything the platform runs on

The data model, the services, the cache and the plugin base — the machinery every other module relies on.

Owns the CMS data model

Pages (published & saved), the page tree, sites, domains, templates, styles, SEO and languages.

Gateways & services

Every module reads and writes the model through cached services — never raw SQL.

Draft vs published

Keeps the live and working versions separate so editors never affect visitors by accident.

Multilingual & multi-site

Models pages per language and per site: one install can run many sites in many languages.

Page cache

Pre-rendered pages kept ready; publishing clears the relevant cache so edits go live.

Plugin base class

Defines MelisTemplatingPlugin — the base every content block (News, Slider, Categories…) extends.

See it in action

One API for the whole page model

The same data the back-office edits and the front renders — read through cached engine services.

engine — tree & services
// One API for the whole page model — used by BO and front alike:
$tree = $sm->get('MelisEngineTree');
$kids  = $tree->getPageChildren($idPage, 1);   // 1 = published only
$crumb = $tree->getPageBreadcrumb($idPage);

// Template / site / SEO services, all cached:
$tpl  = $sm->get('MelisEngineTemplateService')->getTemplate($tplId);
$site = $sm->get('MelisEngineSiteService')->getSiteById($siteId);
CachedConsistent everywhere
Services

One API for the whole page model

Read pages, the tree, links and breadcrumbs through cached engine services — the same data the back-office edits and the front renders.

  • getDatasPage — published or saved
  • Tree, links & breadcrumb services
  • All cached, all consistent

For developers

How it's wired

Single source of truth

Neither Melis CMS nor Melis Front owns tables — Engine is authoritative for the page & site model.

Cached everything

laminas-cache (filesystem + memory); a publish invalidates the page cache.

The plugin framework

MelisTemplatingPlugin: front() renders on the live site, back() renders the back-office edit container.

// Every content block extends the engine's base plugin:
class MyBlockPlugin extends MelisTemplatingPlugin {
    public function front() { /* render on the live site */ }
    public function back()  { /* render the BO edit container */ }
}

Part of Melis Platform

Explore the rest of the platform

Melis Engine is the foundation — here are the modules built on top of it.

The engine behind every page

See how the platform’s data foundation fits together.