MODx Recursive Parser (Beta 2)
Parser Features
- New Parser Syntax
- Conditional Looping/Parsing
- Nested Tag Support
- Recursive Parsing
- Pass Multiple Parameter Values to a snippet
- Pass By Value - Directly pass Arrays and Objects from one snippet or TV to the next
- New REPEAT-WHILE Tag
- Auto Escape – Automatically escape html entities that are using inside parameter values
- Support complex layouts using placeholders
- New HTML form field placeholders
Changes in Beta 2a
----------------------
* fixed caching issues with broken snippets/plugins
Changes in Beta 2
----------------------
+ Update documentation
+ Add Table Source support to REPEAT-WHILE. Converts an <table> into a data source
+ Fix Circular references and deadlocks
+ Add parameters to TVs. example [[*SalesReport? &type=`2`]]
+ Add HMTL form-field filters - strip|escape|raw
+ Change REPEAT-WHILE data fields from #:fields# to {#:fieldname#} to enhance visibility
+ Added new HMTL form-field placeholder tags [[+:]]
+ Remove [[:REQUEST]] tag
+ Allow nested Placeholder that are not set to return ’’
+ Renamed LOOP-WHILE to REPEAT-WHILE
+ Change &allowemptyrows to &allowEmptyRows
+ Change tplalt to altTpl
+ Add Pass by Value for TVs
+ Cache Plugins inside sitePlugins.cache.php
+ Bug Fixes
Note: Some function where removed from the $modx object: evalSnippet(s) and Etomite db Functions by Ralph
Please test and report any optimizations, bugs and fixes.
A Quick Intro
The recursive parser was designed to provide greater flexibility and to combat some of the limitations of the current MODx parser.In addition to the new features this version will automatically convert and render existing parser tags.
For starters there are around ten parsers tags to begin with. Each tag can be individual configured as a non-cacheable tag.
The new tag format is slightly different from the old but provides a simple and consistent format for all the tags:
[[%LanguageTags]]
[[*TemplateVariables]]
[[*#TemplateVariables]]
[[++SystemSetting]]
[[+Placeholder]]
[[~DocumentID]]
[[~~DocumentID]] - Perma link
[[$chunks]]
[[:Condition]]
Please see the attached document for more information.
How to Install
To install unzip the manager.zip to a folder and copy it’s content (including folders) inside into the root of your site. This will replace the manager/includes/document.parser.inc.php file and will add manager/includes/extenders/parser.class.php to your MODx site. Make sure to first backup your manager/includes/document.parser.inc.php before testing.