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.

How to offset for a specific status

April 22, 2008 8:12pm

Subscribe [2]
  • #1 / Apr 22, 2008 8:12pm

    latte02125

    119 posts

    I have a weblog entries that selects on a status of ‘open’ articles and ‘featured articles.’

    I want to suppress the first featured article since that will be displayed in the main part of the page but, I want to display all ‘open’ articles.

    any ideas about the best way to do this?

    Thanks!
    Michael

  • #2 / Apr 22, 2008 9:04pm

    PXLated

    1800 posts

    Wouldn’t the Offset Parameter do it?

  • #3 / Apr 23, 2008 1:13pm

    latte02125

    119 posts

    The offset will offset the first items in my weblog entries. but since I select on 2 statues ‘open’ and ‘feature’, if I use offset, it could offset and article with ‘open’ status, but I only want to offset the first article if it is ‘feature’ and not ‘open’

  • #4 / Apr 23, 2008 2:04pm

    PXLated

    1800 posts

    Could you use conditionals…something along these lines…
    {if status == "featured" AND count == “1”} css class for display: none {/if}

  • #5 / Apr 23, 2008 9:28pm

    latte02125

    119 posts

    YES… I think that will work very nicely. 
    Thanks very much!!!  This really helps a lot.

    M-

  • #6 / Apr 23, 2008 10:23pm

    latte02125

    119 posts

    Oh, as I was putting this code in place, I discovered that it’s the first featured article that needs to be supressed, so it could be count 1,2,3 4…  So, now, when I do a test for featured article, the first time I want to skip and set a varaible so that when I loop back, I can know by the this variable, that it’s ok to display the 2nd featured article.


    {if status == “featured” AND 'first_featured' == ""}
    skip..
    set variable ‘first_featured’ = 1
    {/if}

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

ExpressionEngine News!

#eecms, #events, #releases