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.
Hi
I have a content type where I added a reference field to reference a view. In order to filter the view I need to pass a variable argument.
When entering the nid to filter it works. When trying to add a token [field_nameoffield] it doesn't work.
Is this something that is already integrated? Or is token support not available at this moment? If not, could you add it in the future?
Thanks !
Comments
Comment #1
dazz CreditAttribution: dazz commentedI tried something similar with [node:language] but this doesn't seem to work either, or is it just not meant to work?
Comment #2
mrfelton CreditAttribution: mrfelton commentedLooking for this too - I need to be able to pass in the current user's ID to my view, but it currently seems impossible.
Comment #3
danielb CreditAttribution: danielb commentedYou can use a contextual filter to get info about the current page or user. No need to supply arguments manually.
Comment #4
rogical CreditAttribution: rogical commentedYou should exactly use viewfield module, which supports token as default value.
Comment #5
danielb CreditAttribution: danielb commentedlolwut
Comment #6
jsheller CreditAttribution: jsheller commentedHello! I have the same problem. I tried to reference nodes which are created by the same user as the current node. But when I try to use the token [node:author:uid] as argument it doesn't work. Then I tried to use the contextual filter like described in comment #3 but this does not work for me, too. Maybe I set the contextual filter wrong. Does someone have a solution for this in the meantime? Thank you very much! I am using Version 7.x-2.0 of this module.