I'd like to pass the value of a views argument into the 'filter' in the views module.

I'd like to have it so that when I access a url like:
http://www.example.com/products/blue

All of the products who's node title CONTAINS the word 'blue' should be returned in a table view.

This is basically duplicating the functionality of the search module, but applying the same idea to views.

Ultimately, I'm trying to do this so that I can use the 'insert views' module like so:

[view:products=10=blue]

and be able to insert 10 nodes' worth of 'blue' products into the body of another node.

It would be nice if one were able to designate '$args[0]' as the 'value' of a 'Node Title CONTAINS' filter.

Any ideas how I might do this?

Comments

smallfoambirds’s picture

I have a CCK field for "Last Name" and would like to be able just to send the argument "A" (or B or C etc) to a view, and return every node with a "Last Name" field that starts with A (or B or C). Seems like if I can pass the argument to the Value of a filter with the "starts with" operator, I'd be set.

Is this possible? Or is there a better solution?
Thanks

mixey’s picture

Did you find solution?

summit’s picture

Hi,

Did you find a solution?

greetings,
Martijn

mixey’s picture

Actually I did. Please take a look at the handbook http://drupal.org/node/164471