Now that #484340: Token support is taken care of, there is likely to be a surge of demand for additional CTools context keywords. There are very similar to tokens, but token.module didn't work for this (though the new line of token stuff that eaton is working on *will* be compatible with this and may eventually replace the existing system, that can't happen just yet).
Using hook_ctools_context_convert_list() and hook_ctools_context_converter_alter() it should be fairly easy to add context keywords for CCK fields. Especially since the contexts can be restricted to a type or set of types in most cases. I haven't tested this system out, but I meant it in particular for CCK and things like it that add fields to nodes.
I'm not sure if I'll have the chance to work up a patch myself.
Comments
Comment #1
markus_petrux commentedI just tried to figure out by looking at CTools code (latest dev). Please, correct me if I'm wrong.
Is this prototype correct? Please, see @todo comments.
Comment #2
markus_petrux commentedWell, it seems we could wait a little until token for D7 is committed, backported to token 2.x for D6, and then it seems CTools could take the food from there. Will see... meanwhile, I think we can mark this issue as "postponed".
For reference:
- #484340: token support (comments #8 to #12) (CTools issue)
- #113614: Add centralized token/placeholder substitution to core (D7 issue)
Comment #3
joshuajabbour commentedI'm not sure if there really are contexts or situations that tokens wouldn't work within, but ctools 6.x-1.7 has built-in support for node tokens. However, CCK field tokens were broken because ctools was only grabbing the first set of tokens (those provided for base node values). This patch fixes the issue and adds CCK fields into the node contexts: #943896: Context converters using token module limited to one set (omits CCK fields, etc).