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.

different styling for first entry title in list

April 05, 2011 5:07pm

Subscribe [2]
  • #1 / Apr 05, 2011 5:07pm

    brittanyA

    184 posts

    I need a basic list of entry titles on my homepage, which is easy enough. However, I want to style the first title differently AND include a thumbnail (another custom field) but ONLY for the most recent entry. Is there an obvious way to do this that I’m missing, or do I need to call the {exp:weblog:entries} tag twice with the second one being offset by 1?

    Thanks!

  • #2 / Apr 06, 2011 12:10pm

    Sue Crocker

    26054 posts

    Hi, Brittany.

    In EE, you have the ability to check for the {count} variable while inside an exp:weblog:entries loop.

    You’d do something like this:

    {if count == '1'}
    do something here
    {/if}

    Does that help?

  • #3 / Apr 06, 2011 12:54pm

    brittanyA

    184 posts

    Oh, perhaps. I thought {count} was just for displaying the number of entries. But re-reading the docs I think I’m wrong. I’ll try it out. Thanks Sue!

  • #4 / Apr 06, 2011 6:08pm

    Sue Crocker

    26054 posts

    Sounds good - Feel free to start a new thread if you have any more questions.

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

ExpressionEngine News!

#eecms, #events, #releases