theme_token_list (split theme_token_help in two)
arhak - September 14, 2009 - 05:07
| Project: | Token |
| Version: | 6.x-1.12 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
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 |
|---|---|
| 2009-09-14 theme_token_list.patch | 1.11 KB |
