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.

Expiration date for categories? Is it possible?

November 02, 2011 9:17am

Subscribe [3]
  • #1 / Nov 02, 2011 9:17am

    liquilife

    147 posts

    Hi everyone! I am building a site which will have sets of products that will rotate though the site. The client needs to be able to set a start and end date for each set of products to be available on the website. I’m working in my mind the most intuitive method to do this. It seems each set would be best off in it’s own unique top level category. Is there a way to expire a category based on a date? Or is there another method to achieve what I need that I am not thinking of?

  • #2 / Nov 02, 2011 2:18pm

    Rob Allen

    3118 posts

    There’s no out of the box method of expiring categories, but if you use the show_empty=“no” parameter in your exp:channel:categories tag it will only display if there are current entries inside it.

    That way you could set your product entries to expire, so when they have all expired the category link will no longer display on your site.

  • #3 / Nov 02, 2011 6:41pm

    Hoosteeno

    109 posts

    Seems like there might be a way to do this by creating a second channel whose entries had fields like this:

    * related product 1
    * related product 2
    ...
    * related product n

    Then you might be able to use that entry’s expiration date to control display of its related entries.

    Just an idea 😊

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

ExpressionEngine News!

#eecms, #events, #releases