Coder Social home page Coder Social logo

fastfield's Introduction

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

fastfield's People

Contributors

argnist avatar bezumkin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.