Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By dfish17 on
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
If you have a look where you
If you have a look where you define the "Path" of your view, there is a description under that field:
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!
Thanks Stefan!
Thanks Stefan!
Thanks Stefan!
Thanks Stefan!