Mosaic template files must use the .mosaic.php file extension.
Extendable Structure Path
Mosaic uses Fusion's built-in extension logic to handle template files,
defined in the fusion.json metadata as follows:
{
"id": "valvoid/mosaic",
"structure": {
"/templates": "extendable"
}
}
Note
Relative directories in the metadata structure are abstract paths, as they
may not correspond to an actual directory on disk, as in Mosaic.
To register your custom template files, map your structure path to Mosaic's exposed
extendable path in your fusion.json metadata. For example, using a directory
also named templates:
{
"structure": {
"/templates": ":valvoid/mosaic/templates"
}
}
Alternatively, map individual files:
{
"structure": {
"/templates": ":valvoid/mosaic/templates"
}
}
Directory Organization
Mosaic recursively loops through directories mapped via structure metadata,
loading all files and subdirectories in alphabetical order. For example, the
custom templates directory mapped above could have the following content:
subdirectorytemplate.mosaic.php
template.mosaic.php
This results in the following load order:
template.mosaic.php: loaded firstsubdirectory/template.mosaic.php: loaded after, overlaying the first