开发者

Token value as a filter for Drupal View

开发者 https://www.devze.com 2023-02-01 06:50 出处:网络
I am trying to make a view such that it will bring a type of content based on logged in user name. I have added username as a vocabulary term to all content. Now I want to filter the content based on

I am trying to make a view such that it will bring a type of content based on logged in user name. I have added username as a vocabulary term to all content. Now I want to filter the content based on logged in user name via filters available in View. For this I am trying to use token module.

Now my views are coming empty, which probably means that token module is not working. So my question is that can we use token along with View Filter and if yes, ho开发者_JS百科w.

Thanks


You don't need the token module. You should be able to do this with views arguments:

  • Add a new argument "User: Name".
  • Under "Action to take if argument is not present" select "Provide default argument".
  • Under "Provide default argument options" select "User ID from logged in user"
0

精彩评论

暂无评论...
验证码 换一张
取 消