Hi everyone,
Can anyone help on how to rewrite the output from a field in views to replicate the teaser view inline links? I am using the Content: Comment count as a field and have it currently output as a link using the following:
node/[nid]/#comments
This gives me something like: mysite/node/200/#comments <-- pathauto doesn't correct this for some reason - maybe I need a new replacement in pathauto settings for blog posts? I use the pattern 'blog/[node:title]' for all blog posts.
However, in the teaser view you get a much nicer url like: blog/my-blog-post#comments
And also the links are inline on the teaser with a ul class so the list can be easily styled. My current output is:
<span><a href="/blog/my-second-blog-post">Read more</a></span>
<span><a href="/node/200/#comments">3 comments</a></span>
<span><a href="/comment/reply/200#comment-form">Add new comment</a></span>
Which is pretty impossible to style. They need to be in a list, preferably with the classes node-links and inline-links like on teaser display.
Huge thanks if anyone can help!
Comments
Path
Can't you add the path to the fields Content: Path (Path): put it at the top and exclude it from being displayed and then put in [path] in the rewrite.
Peter J Lord
http://peterjlord.co.uk
Thanks, that sounds like a
Thanks, that sounds like a solution, will try later when I get in.
I still need help in outputting my 3 links as a list though, have been googling 'lists inside views', 'inline links in views fields', 'recreating teaser view with fields' etc but no luck so far.
You should be use global redirect module
Hello,
This module will helpful for you, http://drupal.org/project/globalredirect
As it redirect your comment path URL to same as your pathauto module..
Ok, so I am trying to rewrite
Ok, so I am trying to rewrite the output of a 'read more' link to test the theories. So far I have a list like so after rewriting the results which is nearer but still a bit off the mark:
I ideally wanted:
Any ideas anyone?
Ok, so stepping it up a
Ok, so stepping it up a bit:
Ok so far with one link and then some plain text. The problem with the output I get when I make comment count output as a link [path]/#comments is this:
??
Thanks.
Worked it out after many
Worked it out after many hours of annoyance! Here's how:
http://drupal.org/node/1329052