Posted by e2thex on July 20, 2011 at 5:24pm
The basic idea is that when one defines the token they add an addition param of function which is a callback to be used.
<?php
$info['tokens']['f']['cap'] = array(
'name' => t('Capitalize'),
'description' => t("Capitalizes the value. ") . token_function_help(1),
'dynamic' => TRUE,
'function' => 'strtoupper',
);
?>so cap would take what ever the X in [f:cap:X] and capitalize it.
one can use multiple params separated by :
and one can use tokens but they need to be wrapped in {} instead of []
Downloads
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Utility
- Downloads: 61
- Last modified: July 29, 2011