My goal is to have a page and a forum topic that have an identical title. At the bottom of the page I want a table showing the titles of all comments that are in the forum topic with the same name, so one can click on any of the titles and is linked to the discussion about the page (I don't use normal comments, because I want all discussion in the forum).

I created a view that shows the title of all comments in all forums as a table and chose block as display.
Now I need help to dynamically filter out only those comments that are attached to the forum topic with the identical title. If I add the argument node.title and choose basic validation, I can pass an argument (in preview) and filter, but I don't know how to pass that argument if the view is inside a block on a page.
I tried to pass the argument via URL and I tried PHP Validation and some instruction like
$view->node.title = $view->page_title;
Maybe someone can help me and explain how to pass arguments via URL or, even better, to write a PHP instruction that dynamically assigns the pages title as argument.
Thanks a lot in advance!

Comments

deshilachado’s picture

Status: Active » Closed (fixed)

Found out how to do it myself:
I just don't pass an argument and then I provide as default argument the following PHP Code:
return drupal_get_title();