开发者

Filter by third argument in Drupal Views

开发者 https://www.devze.com 2023-03-03 11:35 出处:网络
I am trying to create a Block View filtering by the path\'s (actually an alias) third argument, but can\'t succeed.

I am trying to create a Block View filtering by the path's (actually an alias) third argument, but can't succeed.

The path where the block is displayed is sitename.com/first/second/third.

Actually the third argument is the node's author, in the end, I am trying to display a block where only the content created be the author of the node the block is in... I.e: in the content type Garage node created by user Joe, there should be a block of content type Cars created by Joe. The node's path would then be garagecars.com/garages/spain/joe.

I have tried setting 3 Global:Null arguments and then User:Uid but it doesn't work.

Filter by third argument in Drupal Views

Help? Any other way to filter by node author? (have been a long while searching and the "filter by path arguments" approach seemed the good one, but I must be missing something 开发者_如何学Gothen).

UPDATE: in the Views preview the path garages/spain/joe works but it doesn't in the page itself http://garagecars.com/garages/spain/joe... which has me ever more puzzled.

SOLVED: I was inserting the blog programatically throught the views_embed_view($viewName, $display_id, $args)... that's why it DID work on preview but when the page was rendered, the arguments set programmatically overrode the one's in the path, thus not working.


Solved in the same question. Information provided on making this work.

0

精彩评论

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