1

I know this is a common request, but I have had no luck finding any answer. I am setting up a single user blog on my site. The blog has it's own page.

I have made a custom content type based on the Article content type. Then set up a View that displays these for the the blog page. The only thing I can't seem to make happen is to set up a custom teaser length with read more links that take you to each full Article node.

When I set the Row style: node/Page row style options/build mode to Teaser, I get the shorter teaser length, but no read more link to the full node.

I am using Drupal 6.

2 Answers 2

1

Can you use "Rewrite the output of this field" on the teaser (or the body) to limit it to a certain length? You can break on a word and show an ellipsis, and you will also be able to show the Read More link as usual. You have to use a row style that will let you use Fields for this, though. Otherwise, you could try to find the function that Views uses to do the same thing and add a template file and preprocess function to alter the teaser length in the same way.

Check the "Information" setting on the bottom-left of the Views 2 UI to see the available templates. You basically copy the base version of one of these to your theme directory, name it as specifically as is needed, and then change it to match your needs. In this case, you wouldn't change it, but you would implement THEMENAME_preprocess_PATTERN (<--- depends on which one) to style the field value appropriately.

1
  • I did try using the "Rewrite the output of this field" on the body to limit the length. )To do this I did need to use a row style of fields.) This indeed did limit it, but I still didn't get a "Read More" link. I will look into your other suggestions too.
    – arne
    Commented Nov 4, 2011 at 4:43
0

You can add your own "Read More" link by adding a Content: Link field, and adding your own text, e.g, "Read More".

1
  • Thank you for the suggestion. I have been able to use this to get something in place. I wish Drupal had a better single user blogging system in place!
    – arne
    Commented Nov 4, 2011 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.