Thanks for the great module! I recently used it to rearrange our file directories and it worked great.
One thing I noticed is that I needed to add a custom field token, the first character of the file name, and even though I added it to the field tokens and could see it in other places, it wouldn't show up when working with filefield_paths.
I ended up here, in filefield_paths.module:
function _filefield_paths_get_values($type, $object, $pathauto = FALSE) {
switch ($type) {
case 'node':
$full = token_get_values($type, $object, TRUE);
break;
case 'field':
$all = filefield_paths_token_values($type, $object);
if (function_exists('filefield_token_values')) {
$all = array_merge(filefield_token_values($type, $object), $all);
}
$full = new stdClass();
$full->tokens = array_keys($all);
$full->values = array_values($all);
break;
}
. . .
I was just wondering why this module excludes all field tokens except its own?
When changing to this:
function _filefield_paths_get_values($type, $object, $pathauto = FALSE) {
$full = token_get_values($type, $object, TRUE);
. . .
and, after altering theme_filefield_paths_token_help similarly, to see your new options, you can access custom field tokens.
Thanks,
-- Travis Lilleberg
Digital Loom
www.digital-loom.com
Comments
Comment #1
tlilleberg CreditAttribution: tlilleberg commentedComment #2
Deciphered CreditAttribution: Deciphered commentedNo longer supporting Drupal 6 issues for this module.