idxtoclass 1.0.0-beta1

idxtoclass 1.0.0-beta1

Released Nov 16, 2013 by sepiariver

Converts numbers to text, for use in classnames for example. 

Based almost entirely on work by Karl Rixon: 

http://www.karlrixon.co.uk/writing/convert-numbers-to-words-with-php/

For more info see: http://www.sepiariver.ca/blog/modx-web/numbers-to-class-names-in-modx

Download 34kb (613 downloads)
Downloads: 612
License: GPLv2
Requires Revolution 2.2.x or greater
Supports mysql

Initial beta release

Installation Instructions

Install via Package Management.

Example usages: 

[[+id:idxtoclass]]

Where [[+id]] === 3

// third

Where [[+id]] === 123456789

// one hundred and twenty-three million, four hundred and fifty-six thousand, seven hundred and eighty-nine

[[+id:idxtoclass=`3`]] options set modulus

Where [[+id]] === 3

// third

Where [[+id]] === 123456789

// third

[[idxtoclass?input=`[[+id]]` &options=`3` &type=`cardinal`]]

Where [[+id]] === 3

// three

Where [[+id]] === 123456789

// three