By Danic on
The title says it all. I have comments enabled and the default "Recent comments"-view active. The block has a list of comments linked to the comment. ()
This is pretty ugly in my case as you see nothing more than on my regular node. (http://www.mydomain.com/mynodealias)
My question is: How can I change the default view "Recent comments" to link comments to
http://www.mydomain.com/mynodealias#comment-137
instead of
http://www.mydomain.com/comment/137#comment-137
Thank you!
Comments
_
just edit the view and use the rewrite options on the 'comment: title' field to specify the path you want to use.
I did, but there is nothing
I did, but there is nothing to choose but "Comment: Title" [subject]. I need something like /[node-which-was-commented]/[current-comments-number]
_
ah ok... just add the 'content: nid' and 'comment: id' fields before the field you are rewriting and check the 'exclude from display' option. That will give you access to the tokens, but not show them in your view.
That worked as a charm.
That worked as a charm. First, the tokens did not show up, then I discovered I had to put rearrange the fields and place them above the field, where I want to include the tokens.
Thank you.
Hi, I'm trying to do the
Hi,
I'm trying to do the something but with path alias instead of node id, I added the field content-path, but I get this problem:
in views Link path, when I enter
[path]#comment-[cid], the result ishttp://nodealias/#comment-256, nothttp://domain.com/nodealias/#comment-256, and if I check "Use absolute path", the result ishttp://domain.com//nodealias/#comment-256.Do you have an idea how to fix this ?
Here is a tiny module that
Here is a tiny module that redirects comment/x paths to nodealias?page=pagerid#comment-id.
http://drupal.org/sandbox/Ayesh/1578662 (my own module and working nice for me FYI)
This module does NOT rewrite any path. Just the redirection.
What's new and changing in PHP 8.4