2

I am working on a site that has a main entry but as I post new entries, it pushes existing content down into summarized items the user can click on for more. I want to have a little summary so the user can read a quick outline of what is being discussed or viewed without having to click on it. I would like to have the typical "Read More" link, however I am not exactly sure how to set that up or code it.

I came across this article while I was searching for possible solutions.

http://colly.com/comments/more-more-more-links-in-expression-engine/

However, I see that it was posted in 2006 so I was curious if this was what I was looking for and secondly if this is still the method used today. I currently have my entries set up with a title, a vimeo link and also a text entry about what the video is going to cover. Thanks for any help, as always it is greatly appreciated.

6

You have two primary options here.

The first, which I'd recommend, is to have a dedicated "Summary" field in your channel. This way the summary can be specifically-crafted as a summary, which is far more useful to your readers, rather than just whatever the first X-number of words of your entry happens to be. Then, display it with a link to your full entry:

{exp:channel:entries channel="blog" limit="10"}
    <h2><a href="{title_permalink="blog/entry"}">{title}</a></h2>
    {blog_summary}
    <p><a href="{title_permalink="blog/entry"}">Read more ...</a></p>
{/exp:channel:entries}

(Where blog/entry is your single entry template, in which you display all your fields for a single entry.)

Your other, lazier option is to use a plugin on your content field, like Hacksaw, which truncates your content into a summary:

{exp:channel:entries channel="blog" limit="10"}
    <h2><a href="{title_permalink="blog/entry"}">{title}</a></h2>
    {exp:eehive_hacksaw words="50" append="..."}
        {blog_content}
    {/exp:eehive_hacksaw}
    <p><a href="{title_permalink="blog/entry"}">Read more ...</a></p>
{/exp:channel:entries}

Either one will get the job done for you.

2
  • 1
    I can confirm that either of Derek's suggestions will work. In my hobby EE site (a blog with Read More links) I have the body content broken down into several fields: an intro, body, and extended body. I display the intro paragraph on "listings" pages, like all entries in a certain month or all entries in a certain category. On my index page, I have the word_limiter plugin to truncate the intro field to 6o words, then it adds the final ellipsis. So I'm using both solutions, but in different places and for different effects.
    – user800
    Jan 15 '13 at 19:39
  • I had a couple issues but it was all on my end. Your solution works exactly the way I was hoping. Thank you so much for your help! Jan 15 '13 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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