I'm attempting to pass a token from a view as a parameter to another view. Not sure if this is a valid function of views or not. Having trouble finding documentation.

I am rewriting the output of a field in view1 as a link view2/[node:field-123].

field-123 is a contextual filter the view2. I have a relationship established in the view2 to the input field. I have "Provide default value" set as contextual filter value and Type Content ID set to "Content ID from URL".

Has anyone passed tokens into a view as a contextual filter???

Thanks

Comments

Stefan Lehmann’s picture

If you have a look where you define the "Path" of your view, there is a description under that field:

This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed".

Under contextual filter you then select: Raw value from URL and select the index of your token argument.

In your example: view2/% the argument would be path component 2.

I like cookies!

dfish17’s picture

Thanks Stefan!

dfish17’s picture

Thanks Stefan!