ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Entry Excerpt

December 07, 2010 11:48am

Subscribe [2]
  • #1 / Dec 07, 2010 11:48am

    Bell Design

    42 posts

    I have looked every where and just can’t seem to find anything.
    Is there anyway within EE v1.6.9 to post a entry excerpt on the blog homepage and they either click on the title or read more links and it takes them to the entire blog article?

    Thanks

  • #2 / Dec 07, 2010 12:39pm

    Paul Stone

    97 posts

    Hi,

    I think you’ll need to do something like:

    {exp:weblog:entries blah blah blah dynamic="off"}
    
    <a href="http://{url_title_path=blog/entry}">{title}</a>
    {if excerpt == ""}
    
    {!-- if you haven't got an excerpt field you'll have to use a truncating plug-in see <a href="http://expressionengine.com/downloads">http://expressionengine.com/downloads</a> or http://devot-ee.com for one --}
    {exp:whatevertruncatingplugin}{body}{/exp:whatevertruncatingplugin}
    
    {!-- if you have got a custom field for excerpt, just use it here --}
    {if:else}
    {excerpt}
    {/if}
    
    <a href="http://{url_title_path=blog/entry}">read more »</a>
    
    {/exp:weblog:entries}

    You’ll probably see what I do is actually do an {if} conditional to test if there is an excerpt in case the end user hasn’t filled one in.

    Hope that helps,
    Paul.

  • #3 / Dec 07, 2010 3:10pm

    Bell Design

    42 posts

    hey thanks, the truncate plugin works great.
    I tried finding one just couldnt think of what it was called besides excerpt, but now I know, lol.

    Thanks again

  • #4 / Dec 07, 2010 6:44pm

    Paul Stone

    97 posts

    Great! Glad that worked for you.
    Paul

  • #5 / Dec 08, 2010 4:37pm

    Ingmar

    29245 posts

    Glad to see you’re all set 😉 Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases