Quantcast
Viewing all articles
Browse latest Browse all 49221

[Solved] Views 2: Handling Arguments Titles

Hi

I am confused on how to present a Title that is representative of a prepared Path; whereby the value used within Path's % args will not be the presented value used by the Title.

For example, let's say I have a content type Project that is represented by Project ID 65 and a Project Name "Build Bridge". Every Project has a set of Tasks, and each Task maintains its relation to a Project with a database field task_project_id.

I have got the basics down on how to use Views' arguments:

  1. I define an argument for %1 argument to refer to task_project_id, which has a views_handler_argument_numeric defined within Task's hook_views_data().
  2. I define a path /project/%/tasks.
  3. This works great in finding all the tasks for a project based upon filtering upon task_project_id

Now I want to set up the Argument Title. Instead of using the Project ID within this Title, referred to by %1, I want to use Project Name to represent the path Project ID. It is not clear to me how to do this.

I thought may be "Argument Handling code" would help, http://drupal.org/node/70145, but it does appear to exist in Views 2.

How can this be done?

Thanks

Jeff in Seattle


Viewing all articles
Browse latest Browse all 49221

Trending Articles