Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Most other forums have the posibility to jump to the last comment instead to the first post (node).
I´m asked from a lot of user if I can change this in the forum.
Possible?
Comment | File | Size | Author |
---|---|---|---|
#3 | last_comment.jpg | 24.42 KB | Wolfgang62 |
Comments
Comment #1
Seldell CreditAttribution: Seldell commentedIf you look in theme.inc, you have a function which is used on post's page template in order to create the link to the last post in a button.
I guess that advanced_forum_last_post_link is good :)
Cheers !
Comment #2
Wolfgang62 CreditAttribution: Wolfgang62 commentedHow can I setup views to make this link possible?
I can´t find an argument to set it up.
Comment #3
Wolfgang62 CreditAttribution: Wolfgang62 commentedI would like to see something like in the attached file.
Comment #4
Russell Mann CreditAttribution: Russell Mann commentedAny news on *how* to do this?
Comment #5
Russell Mann CreditAttribution: Russell Mann commentedI may have a way....
By starting with a View on Comments, you can get the last comment link. Then you can associate back up to the forums. Working backwards. Haven't finished it yet, but it looks promising.
Comment #6
wfragakis CreditAttribution: wfragakis commentedJust sorted it out. Not that bad really and odd not a default but oh well.
Edit Advanced Forum topic list (Content) Master view
Add relationship: Comment: Last Comment
Add field Comment ID with relationship to Last Comment
This gets you 80% of the way there, the rest is formatting. I was in a rush so I did the following (I'll probably do a nice icon later)
Place (Last Comment) Comment: ID prior to Content: Comment Author, exclude display and rewrite result as link node/[nid]#comment-[cid] and rewrite field output to something human readable such as Last post, etc so the link doesn't just read the comment id
Edit Content: Comment Author to rewrite [cid] by [last_comment_name] or whatever you prefer
The reason for doing it this way is that the forum format has a line break as the spacer and the comment link will appear on a new line otherwise.
Finally, go to Format Settings and set the (Last Comment) Comment: ID heading as Last Post.