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.

Single-entry pages and summaries, next and previous entries

August 08, 2009 12:00am

Subscribe [2]
  • #1 / Aug 08, 2009 12:00am

    _JT

    2 posts

    I have no doubt that these questions are answered already somewhere (well, I have some doubt—I’ve done a good bit of searching), but I can’t find an answer that I can understand and implement.

    Basically, my index page is the site blog.  I’m displaying summaries of the 10 most recent entries with this code:

    <div id="content">
    
    {exp:weblog:entries weblog="home" disable="categories|member_data|pagination|trackbacks" sort="dec" limit="10" }
                       <b>{title}</b><br>
                        {summary}<br>
                    {/exp:weblog:entries}
        
    </div>

    What I’d like to do, but can’t seem to be able to do, is link to the single-entry page from each summary. That is, if the reader likes the summary of the first article, they can click a link at the end of it that will take you to the single entry page that contains the full body of the article.

    I also set up another template called full_article, and I thought this would hold the code for dynamically generating the full article based on what the reader clicked on on the index page. I have no idea what code goes here. Here’s what’s there now (which, as you can probably guess, only displays the most recent entry, and does not display it with the permalink url).

    {exp:weblog:entries weblog="home" disable="categories|member_data|pagination|trackbacks" limit="1" }
                       <b>{title}</b>
    
                        {body}
    
                    {/exp:weblog:entries}

    Can anyone point me in the right direction? I’ve read through the knowledgebase, wiki, and forums and haven’t been able to suss out the answers.

  • #2 / Aug 08, 2009 6:56pm

    Marcus Neto

    1005 posts

    I think the part you are missing is in the link. You need to use a title_permalink and link it to the template you have called full_article. That will send the information that you need to the system so that it knows which article to display the full text of. So something like:

    <a href="http://{title_permalink=blog/comments}class=readmore">read more…</a>

    Hope this helps…

  • #3 / Aug 09, 2009 3:05pm

    _JT

    2 posts

    I actually just figured it out, but yes, you’re absolutely correct that that is what was missing.

    Now, on to the next hurdle. 😊

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

ExpressionEngine News!

#eecms, #events, #releases