By nanthony on
I have several variables using the key|label format. The view I am attempting to create will allow the labels to be used as an argument (except some of the longer labels) but not the key value. Can the key value of a given variable be used as the argument instead of the label? So far, this one will not.
Comments
Just a Filter?
If the key|value items are already associated with the content type, you wouldn't need an argument. You could just use the filter criteria and add a filter for the field that contains the values. You get choices of "IS" or "IS ONE OF" and so on.
A list of some of the Drupal sites I have designed and/or developed can be viewed at motioncity.com
These are allowed values
These are allowed values being used as headers. I was wanting to create a view that would change based on the value included in the url. I was hoping to use the key value as the argument rather than the more lengthy label value in the url to alter the page content.
So..for the particular content type there is a header field with allowed values
01|header1
02|header2
(and so on...)
In my view, I want to use the header field as the argument to alter the content displayed but I am wanting to use the key values (01, 02) as the arguments. Some of the labels for the allowed values have brackets "()" in them and don't work as argument values...Plus I don't want all that text in the url.
Mystery Solved....
What I was doing works just fine. I went in and added the key values to the content type after I had already created several nodes. I just needed to go back and reselect the allowed value again for these nodes. Once I do that, the view works just fine using the key value in the argument.