2

I have a new problem that I can't resolve yet. I want to set an expiration date in the matrix for each row. I have a column "date" that I need to use as an expiration date. In search I don't want to display the row if is expired, and if its the only row, I want to ignore it in results.

It is posible to do?

Thanks.

4

Inside your Matrix tag pair this will work:

{if expiration_date_column > current_time}
    {!-- not expired yet, put your row html here --}
{/if}

Or you can use the search parameter on the Matrix opening tag. This is probably better if you only want your result set to include unexpired rows:

{your_matrix_field search:expiration_date_column=">{current_time}"}
    {!-- this returns only unexpired rows --}
{/your_matrix_field}
1
  • This is exactly what I was going to suggest.
    – CreateSean
    Sep 13 '13 at 15:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.