Download & Extend

theme_token_list (split theme_token_help in two)

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.

AttachmentSizeStatusTest resultOperations
2009-09-14 theme_token_list.patch1.11 KBIdleFAILED: [[SimpleTest]]: [MySQL] Fetch test file: failed to retrieve [2009-09-14 theme_token_list.patch] from project client.View details | Re-test

Comments

#1

Version:6.x-1.12» 6.x-1.x-dev
Component:Code» User interface

#2

Status:needs review» needs work

The last submitted patch, 2009-09-14 theme_token_list.patch, failed testing.

#3

Status:needs work» needs review

that patch still applies with fuzz 1,
the space in the filename seems to be a problem

renamed and rerolled (now should cleanly apply)

AttachmentSizeStatusTest resultOperations
2010-03-07_theme_token_list[unix].patch1011 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 31 pass(es).View details | Re-test

#4

Category:support request» feature request

#5

BTW you should be using theme('token_tree') for D7 and D6 now.

#6

Status:needs review» closed (won't fix)

This is a won't fix.