fastField 1.4.0-pl

fastField 1.4.0-pl

Released Dec 06, 2013 by argnist

This plugin adds new tag [[#resource_id.field]] for MODX Revolution 2.2+.It is a simple replacement of getResourceField. It supports grabbing:

[[#1.pagetitle]] resource fields

[[#1.tv.myTV]] resource TVs (processed)

[[#1.properties.articles.articlesPerPage]] resource properties

[[#POST.name]] value of $_POST['name'] (and other global arrays as with snippet getReqParam)

You don't need to install getResourceField and getReqParam for its work.

Examples:

1) [[getResourceField? id=`1` &field=`pagetitle`]] is similarly to   [[#1.pagetitle]]

2) [[getResourceField? id=`1` &field=`myTV` &isTV=`1` &processTV=`1`]] is similarly to   [[#1.tv.myTV]]

3) [[#1.properties.articles.articlesPerPage]] or [[#1.property.articles.articlesPerPage]]   or even [[#1.prop.articles.articlesPerPage]]  (isn't supported by getResourceField)

This example makes sense for Articles extra. Namespace "core" is standard.

4) [[!#get.name]] returns value of $_GET['name']. Supported global arrays: $_GET, $_POST, $_REQUEST, $_SERVER, $_FILES,   $_COOKIE, $_SESSION. The type of array after # is case-insensitive. The name of array element is case-sensitive.   You should use uncached tag [[!#get.name]] for cached resources.   CAUTION: use :stripTags output filter to prevent XSS-attacks (eg. [[!#get.name:stripTags]])!

It supports output filters, for example [[#3.pagetitle:ucase:default=`[[*pagetitle:ucase]]`]]

Download 23kb (11413 downloads)
Downloads: 15,045
License: GPLv2
Requires Revolution 2.2.x or greater
Supports mysql,sqlsrv

This plugin adds new tag [[#resource_id.field]] for MODX Revolution 2.2+.It is a simple replacement of getResourceField. It supports grabbing:

[[#1.pagetitle]] resource fields

[[#1.myTV]] resource TVs (processed)

[[#1.properties.articles.articlesPerPage]] resource properties

[[#POST.name]] value of $_POST['name'] (and other global arrays as with snippet getReqParam)

You don't need to install getResourceField and getReqParam for its work. Moreover this plugin is faster than usage of those snippets because it replace modParser by own parser and new tag becomes native.

Please report any issues to https://github.com/argnist/fastField/issues

Installation Instructions

Examples of use:

1) [[getResourceField? id=`1` &field=`pagetitle`]] is similarly to   [[#1.pagetitle]]

2) [[getResourceField? id=`1` &field=`myTV` &isTV=`1` &processTV=`1`]] is similarly to   [[#1.tv.myTV]]

3) [[#1.properties.articles.articlesPerPage]] or [[#1.property.articles.articlesPerPage]]   or even [[#1.prop.articles.articlesPerPage]]  (isn't supported by getResourceField)

This example makes sense for Articles extra. Namespace "core" is standard.

4) [[!#get.name]] returns value of $_GET['name']. Supported global arrays: $_GET, $_POST, $_REQUEST, $_SERVER, $_FILES,   $_COOKIE, $_SESSION. The type of array after # is case-insensitive. The name of array element is case-sensitive.   You should use uncached tag [[!#get.name]] for cached resources.  

CAUTION: use :stripTags output filter to prevent XSS-attacks (eg. [[!#get.name:stripTags]])!

By default it sanitizes global array with $modx->sanitizePatterns.

It supports output filters, for example [[#3.pagetitle:ucase:default=`[[*pagetitle:ucase]]`]]

fastField 1.4.0-pl

- More compatibility with original modParser

- Finds TVs without .tv prefix.

- Sanitize Global arrays

- More compatibility with json fields

- Better error logging

- Some small fixes

--------------------

Fix problem with uninstallation

fastField 1.3.1-pl

--------------------

Fix problem with uninstallation

fastField 1.3.0-pl

-------------------

- Totally replace modParser by fastFieldParser

- Cache resource

fieldsfastField 1.2.1-pl

-------------------

- Fix null-field issue

- Fix error logs for TV

fastField 1.2.0-pl

-------------------

- More complex tag processing: nesting, caching and all features of resource fields;

- Global arrays support;

- Error logs for unknown fields and non-existent resources.

fastField 1.1.0-pl

-------------------

- Add processing output filters as default tags do. For example, [[#3.pagetitle:ucase:default=`[[*pagetitle:ucase]]`]]

fastField 1.0.0-pl

-------------------

Initial Version

Version Released Author Downloads
7 Versions 1 Contributors 15,067 Downloads
1.3.1-pl Sep, 13 2013 argnist 1,011
1.3.0-pl Jun, 27 2013 argnist 886
1.2.1-pl May, 23 2013 argnist 488
1.2.0-pl Dec, 30 2012 argnist 822
1.1.0-pl Dec, 07 2012 argnist 244
1.0.0-pl Nov, 29 2012 argnist 213