0.2.0
Demo set, manager-side editing, and a bridge that no longer mistakes PHP for EVO syntax.
Fixed
- EVO tag detection.
EvoSyntaxBridgematched on delimiters alone, so[[1, 2], [3, 4]],$row[($i + 1)]and$a[!empty($b)]were tokenised as EVO tags and never reached Latte as the PHP they are. A tag is now only tokenised when what follows the delimiter could actually name an element, which means a name can never contain]. Token names are keyed by the plugin's own secret rather than the application key. - Template variables rendered as
Array. The core hands a TV over as[name, value, display, display_params, type];DocumentObject::flatten()reduces each to its value before the fields become Latte variables, so{$alxSubtitle}means what[*alxSubtitle*]means. - The system settings page threw on every visit while aLatteX was the selected chunk processor. The radio is injected from
OnSiteSettingsRendernow, which renders after the radios and before the page's own script, so the CMS finds a checked option instead ofnull.
Added
- A demo set: six pages with one template each, five chunks, four snippets and three TVs, covering Latte 3 in full, all six EVO tag forms, the
evo*functions and the places the two syntaxes meet.composer demo:install/composer demo:remove, or the matchingartisan alattex:demo:*commands. The same files are the package's test fixtures, so the pages you click through and the fixtures CI renders are the same bytes. - Syntax highlighting for the Resource content field, the one element editor Evolution CMS leaves bare. It loads the CMS's own CodeMirror, registers in the same
myCodeMirrorsmap the manager's theme switch iterates, sizes itself from its content between 5 and 20 lines, and highlights EVO tags - not Latte ones, because Latte finishes before[*content*]is substituted and a{$var}in that field prints verbatim. - Templates in files. aLatteX registers
lattewith the core's Template code switch (evolution-cms/evolution#2432), so a template can be kept asviews/<alias>.latteand edited under version control instead of in the manager. The pipeline is identical either way; the switch itself needs Evolution CMS 3.5.9, while rendering from a matching view file has always worked. - Documentation under
docs/: Latte syntax as it behaves inside Evolution CMS, the EVO tag forms andevo*functions, the interop and parse-order rules, and the demo.
Notes
- Requires the
chunk_processorsystem setting to beaLatteX; the demo installer says so if it is not. - The local pipeline (
docker compose -f ci/compose.yaml up serve) now produces a site with a styled manager, working around an upstreamcli-install.phpgap that leavesmanager_themeunset. Fix submitted upstream.