I have defined a view where I use the Node: Title Argument type with %1 rest of title in the Title text box. This works fine, except that the title is returned as: "ARGUMENT rest of title"
I don't think this would affect anything, but that view is being presented through panels

Does anyone know why that argument text is uppercase and how I can change it?

Comments

mactoph’s picture

In views/module/views_node.inc, I changed Line 538 from:
return check_plain(strtoupper($query));
To:
return check_plain($query);

and it works fine.

xjm’s picture

Thanks for the followup; I was frustrated by this issue when I upgraded to views 1.6 and CCK 1.7 for compatibility with some views-related modules. It doesn't make sense to me to force uppercase on the argument text; if someone wants all uppercase they can do it in theming.

Unfortunately, making this change in views_node.inc did not resolve the issue for me. The text (e.g.) "Eau Claire" is now "EAU-CLAIRE." I did empty all my cache tables, but removing all the strtoupper() in views_handler_arg_nodetype() did not get rid of the problem.

I checked in modules/cck/content_views.inc (since my nodes are CCK content types) and tracked the issue to an identical snippet in cck/text.module:

    case 'link':
      return l(strtoupper($query->letter), "$arg/$query->letter");

    case 'title':
      return check_plain(strtoupper($query));

Stripping the strtoupper() there gets rid of the uppercase for me. However, this still does not resolve the issue that I am getting the key (eau-claire) rather than the value ("Eau Claire").

xjm’s picture

It looks like this may be related to a "temporary" fix having to do with case sensitivity:
http://drupal.org/node/196374
http://drupal.org/node/268904

I will try installing the dev versions of both CCK and Views and see if that makes a difference.

xjm’s picture

Well, there is no difference between the release version of CCK 1.7 and the most recent dev version for this issue, nor between Views 1.6 and the latest dev release.

xjm’s picture

I posted an issue for this at http://drupal.org/node/271264 to see if there's a backend bug or change that might be related.

sittard’s picture

None of the above ideas worked for me so I edited my page.tpl.php and modified the print $title to:
print ucwords(strtolower($title)).

xjm’s picture

This will work for many titles; however, it won't use the correct capitalization for (e.g.) "NASA" or "Prairie du Chien." I did something similar using the Views argument handling code.

I think one might be able to customize the argument handling code to compare the argument and the actual value from the node.