Index: token.tokens.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/token/token.tokens.inc,v retrieving revision 1.27 diff -u -p -r1.27 token.tokens.inc --- token.tokens.inc 13 Nov 2010 19:12:45 -0000 1.27 +++ token.tokens.inc 13 Nov 2010 19:35:05 -0000 @@ -157,6 +157,11 @@ function token_token_info() { 'name' => t('Page number'), 'description' => t('The page number of the current page when viewing paged lists.'), ); + $info['tokens']['current-page']['query'] = array( + 'name' => t('Query string parameter'), + 'description' => t('The page number of the current page when viewing paged lists.'), + 'dynamic' => TRUE, + ); return $info; } @@ -329,6 +334,15 @@ function token_tokens($type, $tokens, ar break; } } + + // Query string tokens. + if ($query_tokens = token_find_with_prefix($tokens, 'query')) { + foreach ($query_tokens as $name => $original) { + if (isset($_GET[$name])) { + $replacements[$original] = $sanitize ? check_plain($_GET[$name]) : $_GET[$name]; + } + } + } } // Entity tokens.