Active
Project:
Read More Link (Drupal 6 and earlier)
Version:
6.x-5.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2009 at 20:44 UTC
Updated:
4 Sep 2012 at 22:45 UTC
After upgrading drupal from 5.x to 6.x including views 2 and ed_readmore, the "read more ... " is'nt shon anymore in custumised views. Is there a trick to get it work even with those new created views?
Or is there an other way to in views 2 to get a "read more ..." link inline at the end?
Comments
Comment #1
vm commentedComment #2
stattler commentedIn Drupal 6 and views 2, you could just add a field "Node:link" and then edit the configuration form the way you like.
Configure field Node: Link
You can add
Label:
Text to display:
It works. It can be placed inline by setting the Row Style as "inline".
Comment #3
todd nienkerk commentedComment #4
Rob T commentedThanks for the nifty tip.
Comment #5
kdebaas commentedThe module works as expected in Views 2. However, be sure to select, in the Views basic settings: "Row style: Node", and then Build format: teasers, instead of "Row style: Fields".
Comment #7
jeffschulerIt would be nice to have consistent Read More functionality when using Views with fields.
Couldn't ed_readmore append the Read More link in the Teaser field when using Row Style: Fields?
Or if ed_readmore can't modify that field, maybe it could add a Views field called Teaser with Read More link?
Comment #8
roborracle commentedkdebaas - This worked perfectly for what I'm trying to do - thanks for the tip!
Comment #9
momper commented@7 yes good idea
Comment #10
mpotter commentedSubscribed. I would also like to see #7 added. I'm getting really annoyed that Views doesn't already have an option for handling the Read More link properly and only displaying it when the teaser and body are different. Since Views is not going to get "fixed" for D6, adding this feature to the Read More module would be a *great* solution for me.
Comment #11
rickupdegrove commentedI wanted a "Read more..." link in some views feeds I just created.
After trying a lot of things, like this module. I found out I didn't need it.
Output this field as a link
and I used [view_node] in the "Link path:"
It was invalid XHTML because of the issue here http://drupal.org/node/501692
(I also tried all the suggestions on that page to get a proper "Read more..." link)
Several hours later I remembered a site I built a year ago has this feature
When I use Views in D6, In Fields this is what I do...
Add "Node: Link"
In "Text to display:" I use
Read more...
That is *all* I have to do to get SEO friendly "Read More" links in "Views".
Comment #12
held69 commentedI believe this solution can work but what if the read more link is optional.
Some content published by users might be within the maximum amount of characters that is set for "teaser length".
Then a read more link wouldn't be of any use.
Isn't there a more dynamic solution?
Comment #13
hedac commented#12 I think we should have to use some php to compare teaser with body.. and if the are different.. then print the read more. But that would be using views templates... and then.. what is the purpose of read more module then? I think this module should have to take care of that.. providing a views field called read more.
Comment #14
todd nienkerk commentedViews has pretty robust tools for creating "read more" links, so I'm not sure it's worth the effort of creating a views handler for this module to supply something Views does out of the box.
I'm marking this "postponed" until someone can supply a use case in which this isn't a feasible solution.
Comment #15
dkingofpa commentedRestating as a feature request:
Would like to have a "read more" link inline with the teaser for both nodes and views. If the node body content is less than the maximum teaser length, the "read more" should not display.
@Todd Nienkerk
Could you point out where Views does the inline optional read more link "out of the box"?
If I'm missing something, please let me know.
Comment #16
nonzero commented#2 suggests adding a Node: link field and set it to display inline. This doesn't work if the teaser contains a
<p>tag, as it just pushes the link down where the next paragraph would start.Thus, Views does not provide a way to inline the read more link immediately after the teaser.
If someone can point out where in the code Views retrieves a teaser, I can try to fix this.
Comment #17
Desertgirl commentedI am having the exact same issue. I have a view where some articles are long and others are very short. The "node:link" option in views provides a "read more" link for every item in the content type, whether needed or not.
The solution in #5 above might have worked except that I have fields on my content type that I wish to keep from displaying. So that does not work either.
Any suggestions would be much appreciated.
Comment #18
sc0tt30 commentedI agree with others that using the approach in #5 doesn't satisfy some needs. I had fields set up to display a document category above the title, but that doesn't work in Node formatting. And having a more link on all teasers isn't satisfactory because some entries are short enough there is no "more". But these I recognize as limitations with what is a very useful module, so I can live with that.
More significantly, I don't see anything about that in any of the documentation about views. It seems like an important thing to note--if you use fields, you won't get a "more" link on a teaser. I've searched for something like this thread for days, without putting together just the right search terms to get me here. For a while I didn't even realize that Views was responsible for missing 'more' links, and ed_readmore didn't help. So maybe there is something I can do to add a little more to the Views docs (although being new to drupal I'm not sure how to go about it).
Comment #19
kendouglass commentedI would argue that, since most people use the fields row style, this limitation is not what they expect.
I too would love it if this module could also work in "Row style: Fields." I hope you look into adding this capability.
Comment #20
jeni_dc commentedWhen using views fields, if you're using a custom template for your row style you can add a read more link manually that will not drop down if you have a closing p tag as mentioned in #16.
Here's an example of a views setup with fields: Add your content field to your view and trim it to the length you want in the field settings. Set it up so html is allowed and closing tags will be added, that's what's giving us the closing p tags. Add a Node: Link field to your view, enter whatever text you want to show up.
In your template print this out like so:
Make sure to rename your fields as appropriate.
Comment #21
gbirch commentedAs an alternative for people who use fields in their view, if you have or install the Views Custom Field module (http://drupal.org/project/views_customfield), you can create a quick fix with PHP. This fix is similar to the "hard workaround" mentioned in #15 above.
1. Add the Node: Body to the list of fields, but exclude it from the display. You need this for the customfield to work.
2. Create a PHP customfield and insert the following code (or similar):
3. Move this field in the list to display wherever you like.