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.

Listing recent posts with thumbnail

August 22, 2007 10:28am

Subscribe [3]
  • #1 / Aug 22, 2007 10:28am

    SweetSiren

    9 posts

    How can I display my most recent weblog entries with a thumbnail along with its description?


    A perfect example : This whole rss site… http://www.thevelvethottub.com/

  • #2 / Aug 22, 2007 2:21pm

    e-man

    1816 posts

    Just make a custom field called {thumb} or something, set formatting to none and use it to paste in the image code when you upload the image.
    Then just do

    <dl>
    {exp:weblog:entries weblog="my_weblog"}
    <dt>{thumb}</dt>
    <dd><a href="http://path">{title}</a></dd>
    <dd>{summary}</dd>
    {/exp:weblog:entries}
    </dl>

    Style using CSS to your liking. 😊

  • #3 / Aug 22, 2007 2:37pm

    allgood2

    427 posts

    Assuming that you actually have images associated with all recent entries, it’s just a matter of adding the <img > tag to {exp:weblog:entries} output.  I guess I’m not certain what you’re asking. Do you want to know how to repurpose a large image as a thumb? Create a stylesheet to format your thumbnail entry display? Our are you talking about adding images to an RSS feed?

  • #4 / Aug 23, 2007 7:09pm

    SweetSiren

    9 posts

    Our are you talking about adding images to an RSS feed? YES


    I want to put this in my footer code - a “most recent entries” section that will display a small thumbnail automatically (taken from the article) along with an excerpt of the article.

    So its like an rss feed that would be grabbing my own stuff.

    Is there code that can do this? Iv’e seen it on other rss sites that grab this from other sites using thumbnails, etc.

  • #5 / Aug 23, 2007 7:34pm

    allgood2

    427 posts

    I probably wouldn’t think of it as grabbing your own RSS feed. Just think of it as a recent entries listing. Basically, it could be anywhere, but I typically place recent entries listing on the home page, then section index pages or http://www.mysite.org  and http://www.mysite.org/politics/ 

    Like e-man mentioned you’ll want a field for the image. This could be specifically for the thumb image, or you could repurpose an already existing image field.  Then code like this;

    <dl>
    {exp:weblog:entries weblog="my_weblog" orderby="date" sort="desc" limit="10"}
    <dt>{thumb}</dt>
    <dd><a href="http://path">{title}</a></dd>
    <dd>{summary}</dd>
    {/exp:weblog:entries}
    </dl>

    Now if you are repurposing a larger image, you may want to make sure a class is assigned to the image source, like {image}  You can then use the CSS to reduce the image size to whatever size you want.

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

ExpressionEngine News!

#eecms, #events, #releases