I want to add a comment form to my view by using the following code:
print drupal_get_form('comment_node_project_form', array('nid' => $node->nid), 'comment');
However, it shows up a error saying that the variable $node->nid is undefined. I then realized it is a view, not a node.
In the view, by choosing the right URL, e.g. /projects/{username}/{nodeid}, I only show one content.
I guess I can get the node ID by parsing the 3rd argument of the URL. How do I get the node ID from the view's URL?