M Public | 1.0.x - 1.x.x

On This Page

Mosaic is a PHP template engine that combines reusable, static template files with dynamic data to generate website views.

Decoupled Builds

For template and config files, Mosaic uses Fusion's decoupled extension logic, allowing dependency packages in the chain to be extended by consumer packages at package manager metadata level, for example:

  • Package2
    • Consumes Package1 as a dependency
    • Extends Mosaic with additional files for a custom app
    • Modifies base app files
  • Package1
    • Consumes Mosaic as a dependency
    • Provides initial application templates
    • Adds more config
  • Mosaic (Package0)
    • Single Point of Truth (SPOT)
      • Resolves all file roots
    • Modular logic with default config
    • No templates

The chain can include as many extender packages as your project requires.

Intuitive Syntax

Generate views using familiar HTML- and PHP-like syntax in templates, with minimal, consistent elements for variables, conditions, loops, inheritance, and fragments.

Template Relation

Merge inherited templates, included templates, and reusable fragments into unified views with multiple roots. Fragment references can be resolved across templates regardless of their file order or package origin.

Customization

Extend Mosaic with your own template elements to introduce project-specific functionality and syntax, or integrate custom logic into the existing parsing and rendering process.