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.

"Continue reading" link

July 06, 2008 10:20pm

Subscribe [1]
  • #1 / Jul 06, 2008 10:20pm

    K.Brown

    89 posts

    I’m a complete noob at EE.  I’ve made templates for Joomla! and wordpress, so I have extended knowledge of html and css, but not too much js and php.  FYI.

    How do I make that nice “readmore” link that links to the extended part of an entry?
    How should I set up my data structure?

    I want to have the {summary} be the excerpt and {body} be what the “readmore” links to.

    Should it be obvious?  What am I missing?

  • #2 / Jul 06, 2008 10:36pm

    wolferey

    33 posts

    Hey K.Brown!

    Inside the

    {exp:weblog:entries weblog="{my_weblog}" orderby="date" sort="desc" limit="5"}
    {/exp:weblog:entries}

    tags, you can place an if to check if there is text written in either body or extended. If it is, then it will display a link to your post. I have this inside mine:

    {if extended}<strong><a href="http://{url_title_path=" title="Fortsett å lese {title}...">Fortsett å lese {title}...</a></strong>
    
    {/if}

    “Fortsett å lese” is “read more” in english. You can change extended to body in your case, so it will be:

    {if body} something something {/if}

    This: http://expressionengine.com/docs/modules/weblog/variables.html
    and this: http://expressionengine.com/docs/modules/weblog/index.html
    Should also help you in understanding what you could possibly do with EE’s weblogs 😊

  • #3 / Jul 06, 2008 11:00pm

    K.Brown

    89 posts

    Yes!  Thanks so much!  I thought I should use an {if} variable, but wasn’t totally sure.  😊

  • #4 / Jul 06, 2008 11:08pm

    K.Brown

    89 posts

    What tag should I use for the href?
    *edit*
    I figured it out.  The code monkey must have erased some of your code.  Thanks for the help!

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

ExpressionEngine News!

#eecms, #events, #releases