Skip to content

Plugin for MODX Revolution that adds new tag [[#resource_id.field]]

Notifications You must be signed in to change notification settings

argnist/fastField

Folders and files

NameName
Last commit message
Last commit date

Latest commit

eff0316 · Dec 6, 2013

History

14 Commits
Dec 6, 2013
Dec 6, 2013
Dec 7, 2012
May 23, 2013
Dec 6, 2013
May 23, 2013
May 23, 2013
May 23, 2013
May 23, 2013
Jul 3, 2013
Sep 13, 2013
Dec 6, 2013

Repository files navigation

fastField

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]]`]]

About

Plugin for MODX Revolution that adds new tag [[#resource_id.field]]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages