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.

Adding a class to expired entries only

January 20, 2011 3:30pm

Subscribe [2]
  • #1 / Jan 20, 2011 3:30pm

    shellfish

    48 posts

    This question may be related to a resolved thread.

    could you do something similar to this but based on entries that have expired being given a specific class name?

    That would be cool!

  • #2 / Jan 21, 2011 2:47am

    John Henry Donovan

    12339 posts

    shellfish,

    this is more of a how to so I’m moving this thread to the CodeShare Corner forumas its more appropriate there.

    But to put you in the right direction you would basically be writing a conditional comparing the {entry_date} to the {expiration_date}. Something like the following but untested

    {if current_date > {expiration_date}} class="something"{/if}
  • #3 / Jan 21, 2011 4:17am

    shellfish

    48 posts

    Hey John…that looks like a simple solution, will test it out now.

    Thank you!

    Shelley

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

ExpressionEngine News!

#eecms, #events, #releases