MODX EXTRA

setPlaceholders

Creator: jgrant (jgrant)

Download (30 KB)

Screenshots

About setPlaceholders

Information

Released
August 3, 2013
Supported Versions
2 – Current
Downloads
4,898
License
GPLv2

New in setPlaceholders 2.2.1

2.2.1-pl [25.03.2014]

  • Add short convenience aliases for setPlaceholders snippet: sph and spho (with &output=1)

2.2.0-pl

  • Add the ability to process more than one fallback/default value
  • Add a request selector for stuff from the $_REQUEST superglobal
  • Add parents and parentsI selectors for returning a list of parent IDs from the ultimate parent down to the resource
  • Add bounded versions of the parent and Uparent selectors

2.1.0-pl

  • [#2] Add the ability to chain child selectors. Ex: child-1.child2.pagetitle (pagetitle of the 2nd child of the current resource's last child)
  • add a migxR/jsonR selector to get a random item from a MIGX TV.

2.0.1-pl

  • fixes a bug with the parent selector

2.0.0-pl

  • ~3x faster TV handling, now doesn't process them by default
  • adds next/prev sibling selectors. next2 selects the sibling after next, etc.
  • adds a "random child" selector, plus simple ways of retrieving the number of children or parents a resource has, a resource's position amongst its siblings, or the number of items a MIGX TV contains.
  • memory usage improvements

N O T E   T H E S E   C H A N G E S:

  • Removes &fields property (deprecated since v1.1)
  • Now does not process TVs by default. Use &processTVs=1 if you need to process them.
  • Removes output filter functionality. Use the built-in output filter toPlaceholder instead. It works exactly the same.
  • If you specify an index on the parent, Uparent, child, next or prev selector which is out of bounds, setPlaceholders now returns an empty string, which makes specifying a default value easier.

  

1.2.1-pl

  • Improves child selector performance
  • Changes behavior when a value isn't found for a placeholder: now the placeholder will be set to an empty string so MODX will fully parse and cache it.
  • A few other minor fixes and improvements

1.2.0-pl

  • Adds a child resource selector. Ex: child4.pagetitle (4th child) or child-1.pagetitle (last child)
  • Adds optional special processing for MIGX TVs (arrays of JSON objects).  For example, parent.migx.someMIGXtv will set a placeholder for each key/value pair in the TV.
  • Minor performance improvements

1.1.0-pl

  • Added &ph property with a more powerful syntax.  It adds: "Ultimate parent" functionality, the ability to specify different resource IDs, optional user-defined placeholder names, and parsing of default values
  • &fields is now deprecated, but retained for backwards compatibility
  • Performance and caching improvements
  • fix an issue that can generate PHP notices

More

Previous Versions

2.0.1-pl
April 9, 2013
2.0 – Current
2.0.0-pl
April 6, 2013
2.0 – Current
1.2.1-pl
March 19, 2013
2.0 – Current
1.2.0-pl
March 10, 2013
2.0 – Current
1.1.0-pl
February 4, 2013
2.0 – Current
1.0.1-pl
February 3, 2013
2.0 – Current
1.0.0-pl
January 12, 2013
2.0 – Current
More

More from jgrant

Resizer

Resizer

Imagine image resizer for MODX.

pT

pThumb

A fork of phpThumbOf. pThumb is a drop-in replacement for phpThumbOf…

im

imageSlim

The Image Slenderizer.Tired of clients junking up content areas and…