I was using Imagefield and noticed that I can't use the [title] as a token in ALT or TITLE.
I spent some time and figure out to:

- use full "node" for token substitutions
- move default-image handling in Imagefield instead of in FileField (quicksketc already palce a TODO there ;)

my tho patches as attachments.. one for ImageField and one for FileField

Regards

Comments

quicksketch’s picture

I'd prefer not to add a new hook to FileField, considering I just spent a month removing all the custom hooks from FileField. See #397578: Uncouple ImageField from FileField Custom Hooks. If we need new hooks we should built them into CCK instead of FileField.

As for using node-level tokens, there are a lot of complications around doing this. Deciphered has written node-level support in http://drupal.org/project/imagefield_tokens.

quicksketch’s picture

Title: More Tokens and better "Default Image" handling » More Tokens

Let's keep this issue to adding new tokens and #434446: Move Default Image code to ImageField module to adding new hooks. Please don't group issues together in the future.

thepanz’s picture

Thank you Quicksketch for your reply.

Maybe you can cite "ImageField_tokens" in ImageField front page to let users know about this related module.

I thought that adding an hook to FileField was the right solution, also looking in Link.module for Token integration (done in the field level _sanitize callback).

I'll give a try to ImageField_tokens module.
Regards

quicksketch’s picture

Category: feature » support
Status: Needs work » Fixed

The module is brand new, Deciphered just wrote it in the past couple of weeks. I'll post a link to the project page once he makes an official release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.