As discussed in: http://drupal.org/node/242501

In views_node.inc<code> for both the views 1.6 release and the May 10 '08 dev build, there is code forcing the the arguments in views titles into uppercase (last two lines of the function below, around line 538). It seems undesirable to me to force capitalization because users lose exact control over case in their node titles. Removing the <code>strtoupper() from $query gets rid of the uppercase.

function views_handler_arg_nodeletter($op, &$query, $argtype, $arg = '') {
  static $field = NULL;
  switch($op) {
    case 'summary':
      $len = intval($arg);
      $field = $fieldinfo['field'] = ($len <= 0 ? "node.title" : $fieldinfo['field'] = "LEFT(node.title, $len)");
      $fieldinfo['fieldname'] = 'letter';
      return $fieldinfo;
      break;
    case 'sort':
      $query->add_orderby('node', $field, $argtype, 'letter');
      break;
    case 'filter':
      $len = intval($argtype['options']);
      if ($len <= 0) {
        $query->add_where("node.title = '%s'", $arg);
      } else {
        $query->add_where("LEFT(node.title, $len) = '%s'", $arg);
      }
      break;
    case 'link':
      return l(strtoupper($query->letter), "$arg/$query->letter");
    case 'title':
      return check_plain(strtoupper($query));
  }
}

The capitalization does not seem to happen with the 1.5 release of Views, even though the function views_handler_arg_nodeletter() looks pretty much the same (with strtoupper()).

Is it feasible to remove strtoupper()</copde> from <code>$query so that titles with arguments have flexible case again? Or is there another option? Did the handling of argument title formatting change somehow between the two versions?

Thanks for any assistance.

Comments

xjm’s picture

Missed a /; sorry for that.

xjm’s picture

Title: argument wildcards in views titles forced into uppercase » arguments in views titles forced into uppercase

Fixed title; it's the argument tokens (%1 etc.); not the wildcards.

jesss’s picture

Subscribing.

This is not only a Views issue. Those same lines appear in the CCK text.module at line 149.

case 'title':
      return check_plain(strtoupper($query));
merlinofchaos’s picture

Status: Active » Closed (won't fix)

This will not be fixed in Views 1.