• MODX.com

    919 downloads

idxtoclass

idxtoclass is an extra by sepiariver, first released on 2013-11-16.

Package Description

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

Usage/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

Details

Developer(s)
sepiariver
Released
2013-11-16
First seen
2013-11-16
License
GPLv2
Supported databases
Minimum MODX Requirement
2.2

idxtoclass Releases

Vendor Signature Released on
MODX.com 1.0.0-beta1 2013-11-16 (12 years ago)