Hello Everyone,

I''m using Views to view the latest comment's on my forum, but is there a way to make a link to the latest comment?
When my users are now clicking the Topic title there going to the first page, and they need to click again to go to page ... for the latest comment.

Regards,
Tim Hanssen
Netherlands

Comments

As If’s picture

[This isnt really an issue.] Assuming you have a field for Comment Subject as well as Node Title, select the "List Type" for your view. Then use the Views Theme Wizard to create a simple list theme for it. Paste the resulting code into your template.php file and create the tpl.php file as indicated by the Theme Wizard. You can then write something like this in the tpl.php file:

$node_url = 'node/' . $node->nid;
$comment_url = 'node/' . $node->nid . '#comment-' . $node->comments_cid;
echo "NODE: <a href='$node_url'>" . $node->node_title . '</a>';
echo "COMMENT: <a href='$comment_url'>" . $node->comments_subject . '</a>';
domesticat’s picture

Status: Active » Closed (fixed)

Closed while closing all Views support requests with no activity for 6 months. If you still need help, you may re-open this issue at any time.