Closed (fixed)
Project:
Token
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 May 2007 at 21:06 UTC
Updated:
9 Apr 2010 at 00:20 UTC
If you want to build specific token help for say a node and a user you must call theme('token_help') twice with each namespace. Unfortunately this results in getting the global token help twice.
This function should be changed to either take an explicit array of namespaces to retrieve or a 'global' namespace should be added.
Comments
Comment #1
fagoI agree. I have the same problem with workflow-ng, where 'global' is appearing again and again.
I could do a patch for this. Which solution is preferred?
a) make the inclusion of the global tokens optional
b) remove the inclusion of global tokens
c) or an array based variant, but there I'd need also configurable prefixes/suffixes per type, which might get a bit more complicated
I think, a) would make most sense.
Comment #2
dldege commentedCould global just be another namespace with no special handling?
That is if you want user help and glaoabl help you would call it with each namespace. Another idea is to have the function take an array of namespaces for a parameter instead - like
token_help(array('global', 'user', 'node'));
What do you think?
Comment #3
drewish commentedperhaps http://drupal.org/node/163275 is a duplicate of this... it's got a patch though...
Comment #4
drewish commentedno, never mind, after reading this carefully you're looking for multiple objects, not a specific object.
Comment #5
fagohm, but the given node is seldom available on configuration time. I would love to be able to state the used node type, for which then I get the replacements.
Comment #6
fagodamn wrong issue, forget my comment #5!
Comment #7
gregglesMy solution in pathauto was only to interact with the token_list directly and not theme_token_help.
I think the array solution looks best to me which involves requiring the 'global' explicitly, right?
Comment #8
dave reidWe now have the token tree available for Drupal 6, which can list multiple types easily.
Comment #9
dave reidI should probably just mark this as fixed.