Skip to content

0.2.0

Choose a tag to compare

@elcreator elcreator released this 29 Aug 19:19
· 4 commits to main since this release

Demo set, manager-side editing, and a bridge that no longer mistakes PHP for EVO syntax.

Fixed

  • EVO tag detection. EvoSyntaxBridge matched 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 OnSiteSettingsRender now, which renders after the radios and before the page's own script, so the CMS finds a checked option instead of null.

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 matching artisan 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 myCodeMirrors map 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 latte with the core's Template code switch (evolution-cms/evolution#2432), so a template can be kept as views/<alias>.latte and 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 and evo* functions, the interop and parse-order rules, and the demo.

Notes

  • Requires the chunk_processor system setting to be aLatteX; 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 upstream cli-install.php gap that leaves manager_theme unset. Fix submitted upstream.