Posted by arhak on September 14, 2009 at 5:07am
| Project: | Token |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
add theme_token_list to support module development integrated with token
providen a centralized way to theme available replacements list
for example
<?php
...
$token_list = token_get_list('field');
unset($token_list['node reference']['link']); // remove html link if it doesn't makes sense
// remove other available replacements that won't make sense in this context
$form['node_link']['hover_title_replacements'] = array(
'#value' => theme('token_list', $token_list),
);
?>this certainly will avoid duplicated code and easier future support for other features
PS: a similar (but not the same) issue exists for D5 #163275: theme_token_help for a specific node.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| 2009-09-14 theme_token_list.patch | 1.11 KB | Idle | FAILED: [[SimpleTest]]: [MySQL] Fetch test file: failed to retrieve [2009-09-14 theme_token_list.patch] from project client. | View details | Re-test |
Comments
#1
#2
The last submitted patch, 2009-09-14 theme_token_list.patch, failed testing.
#3
that patch still applies with fuzz 1,
the space in the filename seems to be a problem
renamed and rerolled (now should cleanly apply)
#4
#5
BTW you should be using theme('token_tree') for D7 and D6 now.
#6
This is a won't fix.