By redmonp on
I'm trying to get Argument Handling Code to work for Views in Drupal 5.3, and it is just not working.
I have created a working page View, and have added a Node: Title argument with Option 1 for the alpha glossary. I have enabled "use PHP for block visibility" for anon and authenticated, although I don't think that would matter for testing purposes. I am using the test code that was in the documentation, with no php tags of course:
// Make the first argument 1 if not already set
if (!$args[0]) {
$args[0] = A;
}
return $args;
I have tried the code both with and without the above argument. Nether of those times did the first argument get set to 1. Any ideas?
Comments
It looks like your code sets
It looks like your code sets the first argument to 'A', not '1'
Yeah, I changed that from 1
Yeah, I changed that from 1 to A, but either way, the view spits /viewname instead of /viewname/A, or /viewname/1.
Ok ok, you're right.
Ok ok, you're right. Another stupid mistake by me.